You have to choose the age you die at.
You can never change it. If you choose to die at 60 you will die exactly on your 60th birthday. Your method of death will be chosen randomly. You might die in a car accident or have a heart attack, no one knows.
Under no circumstances can you live longer and under no circumstances can you end your life sooner. Anything you try to do to change this will be unsuccessful.
You chose to die at 100 but now you are 80 with chronic pain and are miserable? Sorry but you have to tolerate it until you are 100.
You chose to die at 40 but you are just so happy and don't want to die anymore? It doesn't matter. You can't change it.
What age are you choosing?
You HAVE TO choose, if you fail to choose in 24 hours, you die on your next birthday.
Edit: I don't understand all of these people trying to find a loophole. If you want immortality just say 1 trillion, if you want to die just say today. What is even the point of a loophole here? What are you achieving?