I'm in my mid-40s and feel like I'll be beyond my usefulness within ten years. Not because I can't learn anything new, but because ageism is a very real thing in this profession. My entire professional and personal life is built around my development skills, so switching careers isn't really an option for me. Certainly not a fiscally viable one.
Besides age being a factor, I'm finding that my entire motivation is at an all-time low. Not burnout. I have no trouble coding for hours on end. I just don't want to anymore. I find myself doing the same stuff now that I did 20 years ago, just a different canvas and with a different language. Complacency is a real thing, too. The only solace I have is that what I'm doing does have a positive effect on other people downstream. (I'm in healthcare and built a case management system for nurses to help people with chronic illnesses.)
So, my answer to your question is, no, it's not true. But, it can be an uphill battle due to external factors.