The best route is Lima-Arequipa-Juliaca-Puno (1,335 km.), which is about a 24-hour drive.
Lima to Juliaca (that last about 1 hour and 45 minutes) and Arequipa (45 minutes).
Cusco (326 kilometers, 10-hour trip) on a train that passes through La Raya (4,321 m.a.s.l.).