An Indian court has sentenced a Pakistani man to death for the militant attack on New Delhi 's famous 17th century Red Fort five years ago .