20-Year Prospect
We're never going to know everything about space. For one thing, humans can be pretty dim. For another, space is infinite. And it just keeps expanding. We still aren't even sure what dark matter is. Or what happens if you go into a black hole (okay, maybe Matthew McConaughey does). There won't be a day in the next twenty years where someone says "Oh, that's it. That's all we needed to know. I guess we don't need astronomers anymore." Your job is very safe.
The only changes that come about will be ones related to new technologies that are developed. Your job might get cooler and more complex as the years go on, but that's about it.