I was worried about that too, but i wouldn't consider so much getting into the gym.
When i was there i realized that the only thing u need to practice is climbing stairs.
But remember to be in Cusco to acclimatize for at least 2 days before going to Machupicchu.
There are different ways to get to
Machupicchu but i prefer the ride to Ollantaytambo by taxi or bus, and then take the train from there to machupicchu which doesn't last long (2 hours) instead taking the train from cusco (4 hours)
If you are planing on doing the Inca trail that's another different history you really need to be in shape but more important is to book in advance 'cause they have a limit number of person to get in.
try this i don't know if it's working still but u[url=http://www.cuscoperu.com/cusco/information-peru/018-inca-trail-avaibility.php
:z8ccamr5o3]IncaTrailAvailability[/url:z8ccamr5o3] could've seen the availability before