It's not news, but the fact is, few people find that job or company and stick with it long enough to be rewarded with a gold watch. Companies and positions will come and go for most people in today's job market. Simple enough, but how?
The details are nuanced, of course, but come down to two main points. First, gain transferrable knowledge.
It's one thing to know how to plug numbers into a company's proprietary software, but it's more valuable to understand how the results are attained and, even more importantly, to be able to interpret results.
Second, grow your network. Now, this sounds obvious and even in the "old days" networking was a part of the deal. The landscape has changed, though, and changed drastically. I won't try to paraphrase blogger Robert C. Pozen's take on this, just suffice to say you have to work at it.