That agrees with my experience. After a certain age, there is an assumption that if you haven't been promoted to management, there is something wrong with you. I haven't worked as a programmer for about four years. I still love programming and code for fun, but I'd be happy if my job title never mentioned software again.
I'm in school training for a new career. One in which my 44 years--and anything since the last glacial maximum--is considered "recent." No doubt, I will still use my programming skills in my new career, and they will be a good selling feature after I graduate. As a programmer, I can count the number of times I've been paid to work outdoors on no hands. As geologist, it is part of the job. Even as a student, I've been some amazing places and seen incredible things. Any career that requires you to hike with a hammer, a bottle of acid, and a set of colored pencils is a good career.