I work primarily in a language that was most popular in the early 90s. As its popularity declined lots of people "jumped ship" (preemptively) to other languages.
For some it went well, for others the think they jumped too has died already. Some discovered that having main-stream skills just makes you a small fish in an enormous pond.
Which is to say that predicting the future is hard. And predicting what skills will be most valuable 30 years from now is pretty impossible.
Yes, I know the present is scary, especially if you are just starting out. All you can do is be adaptable. It's unlikely the tasks you are accomplishing today will be what you are doing 5 years from now.