Sadly, even exercise and good living doesn't always work. I have a family member living with dementia right now who lived a model life as far as diet (vegetarian), exercise (daily for life), no drinking or drugs, and an overall focus on doing everything possible to be as healthy as possible. Conversely, my own grandfather watched all of his coworkers die from cancer due to the chemicals they worked with, was generally sedentary, and lived into his nineties with no major degenerative diseases.
That said, I agree that one is more likely to have positive late-life outcomes if one chooses to live more healthfully in younger life.