Both destinations are served by Gaggal (DHM). Since there's no flight route between them, the best way to travel is by road.
Dharamsala
Fly to Gaggal (DHM), then travel by road to Dharamsala. Taxis, buses, and private cabs are available from the airport.
McLeodganj
Fly to Dharamsala (DHM), then travel by road to McLeodganj. Local transport options include taxis, auto-rickshaws, and state buses.