At 55 years old I'm one of the youngest members of my walking club.
The guy I maybe admire most (although I would never tell him that!) is 75 years old now, and goes striding up hills that would defeat many 20 year olds. Most of the members are retirees, and absolutely loving and living life to the full.
Life is partly reaping what you sow, partly luck.
If you eat crap, smoke, don't exercise, you can look forward to a miserable and early death. If your parents taught you to cook, and instilled in you enjoyment of exercise and the great outdoors rather than sitting on a fat arse in front of a games console eating chips and burgers, then you're off to a flying start.
On the other hand, you can be just plain unlucky. My wife started developing MND at maybe 45, and suffocated to death at 50.
The lady customer of 92 who I drove to her home last week, after a holiday to the USA, is a little slow these days and has to use a walking stick to get around, but I hope that at 92 my mind is still as sharp as hers is today. Will I still be able to code in C++? Who can tell?
Looking on the bright side, I have a photo of my great grandfather who, also at 92, was looking very dapper, dressed up in his suit, out in the countryside with his bicycle. He got it exactly right - he went to bed one night, slept peacefully, and didn't wake.
Don't expect and look forward to death, be good to yourself and with good luck, look forward to a long and fulfilling life.