Rule of specificity—moving under load in mountainous terrain, aka rucking, is going to be the most direct training activity. But since most people can’t ruck in mountainous terrain everyday before/after work, it’s a good idea to get better at the supporting ends of the spectrum: strength and endurance. That’s getting in the gym a handful of times per week, and getting z2 aerobic work in (trail running would be the most transferable example of this).
Pretty simple—want to get better at hiking around with a pack? Hike around with a pack. Want to get better at being comfortable/healthy under heavy loads? Get under heavy loads. Want to get better at hiking up steep inclines? Hike/run up steep inclines.