I feel saying this would be true of almost any career - A mechanic not learning how to work on the latest engine / drivetrain / body work styles could get stuck. A doctor, a teacher, a construction worker, etc...
If all you ever do is 1 thing, sure - you could end up in a dead end. But a lot of us are self taught. So long as you don't loose that drive to continue to learn and expand your knowledge, you should be fine.
edit: I'm 36 so... this better not be true, haha. Being 36 means I learned AJS at 34. I personally don't like React (just to mention 1 new and popular framework) but I like Vue.js and am using it in a project.
I'll add also - the older you get, you might get a bit stubborn, but again, this is just a realization that this industry changes and changes fast and if you don't want to be left behind, you need to keep on top of it.