Lima to Cuzco by plane is about 1 hour. Train from Cuzco to Machu Picchu is 4 hours.
In a straight line there are 312 miles from the main square of Lima to the ruins of Machu Picchu.
As to dos and don'ts:
Do kiss men and women once in the cheek (I mean on one cheek, not like the fench on both cheeks).
Personal space in Peru is smaller than in the US, so don't freak out if people get very clos to you to talk to you.
If you hang out with locals in the sierra (the Andes) and you go drinking, chances are they will do what they usually do:
Drink from the same glass. If this happens, it is OK to pour some beer (which is what they'll usually drink) and rinse the glass, but it is considered rude and impolite to scrub it down with a napkin. Drinking from the same glass for the locals in the mountains (by locals I mean mostly indigenous) is a sign of friendship and trust, so if you start washing down the glass it is a sign you don't trust them.
The man will usually pay when he goes out with a woman although amongst the younger generations it is becoming more normal to "go dutch". However, bear in mind that some guys will be offended if the girl asks to pay.
Don't even think of driving in Lima. Traffic is hectic, unpredictable and drivers tend to be very aggresive.
Do visit the main square in Lima and in Cuzco, as well as both cathedrals. If you show up about noon, you should be able to catch the change of guards at the palace of government.
Do try ceviche and anticuchos as well as Inca Kola. You migh be surprized.
When you get to Cuzco DO NOT, and I cannot stress this enough, do much execise. Try to go to the hotel, drink the coca tea (no it's not a drug, its just a tea made with the leaves of the coca plant) and take a nap. Otherwise the altitude will hit you like a ton of bricks. Let your body adjust to the lack of oxigen at the close to 12,000 feet above sea level at Cuzco.
If you're travelling with a Peruvian, ask them to haggle if you want to buy something. Actually, ask them to ask for the price. Your lack of spanish or foreign accent if you speak spanish will usually hike up the price, at least, a 15%.
If you are taking a taxi, try to take the ones from the hotel. They are a lot more expensive that the ones from the street, but they are also safer. If you MUST take a taxi from the street, again, try to get a local to haggle with the taxi driver. Taxis will try to overcharge you significantly (30% or more) if they know you're a foreigner.
Hope this helps.
Live in Peru. Travel in Peru a lot.