Step machine is probably the best machine in a gym to prepare for the AT IMO.

2 thoughts:
1/ Carry a cheap (lightweight) knee brace
I had a bad knee until I took up long distance hiking. Then...