Forever? That seems over-optimistic for all occupations in all eras.
For the rest of my working career? This really hasn't been true in a long time either, especially in software, where technology changes on the order of years.
For the duration of my mortgage? The fondest hope, but pretty much like the above.
For the next 10 years? Here is the big change. Even for fields like medicine, where knowledge really did set you apart. The AI can adapt faster. AI is inside the human OODA loop.