He did not say whether the release was conditional.
On Thursday, Modi addressed his party's workers and referred to "enemies" who are trying to destabilize and attack the country. As recently as November, Pakistan's leader Khan spoke of "mending ties" with India. He did not elaborate.
"We told them that we will not negotiate and that Pakistan had no card in him", a senior government source said. "It is good for both sides".
Islamabad has prolonged the closure of its airspace until March 1 after two days of military exchanges between India and Pakistan in the contested Kashmir region, leaving thousands of people stranded at airports.
India's army said Pakistani soldiers were targeting almost two dozen Indian forward points with mortar and gunfire. Indian forces claim two militants were killed in the fighting. Indian ground troops saw the aircraft falling in Pakistani territory, he said.
February 14: 40 Indian paramilitary police are killed in a suicide bombing in Pulwama, in Indian Administered Kashmir (IAK).
The incident - the latest in a unsafe sequence of events between the two countries - sent tensions rocketing, as major world powers and bodies including China, the USA and the United Nations urged restraint.
Wing Commander Abhinandan Varthaman will be returned on Friday with Khan urging India not to escalate the situation.
Indian and Pakistani fighter planes fought a brief skirmish Wednesday over Kashmir.
President Trump said that he had "reasonably attractive news" that the tensions between India and Pakistan are likely to lessen a day after the nuclear-armed neighbors engaged in their first aerial combat in almost 50 years. Islamabad denied the allegations. They have fought three wars against each other, two directly dealing with the disputed region.
Indian and Pakistani troops traded fire along the contested border in Kashmir on Thursday, but speaking at a press conference, Trump said the USA had been mediating between the two sides. There were no reported casualties.
Flight chaos as airspace above Pakistan closed amid escalating tensions
Maj Gen Ghafoor said jets had "engaged" six targets in Indian territory but then carried out air strikes on "open ground". One of the aircraft fell inside Azad Jammu &Kashmir, while the other fell inside Indian Occupied Kashmir.
China's Foreign Minister has called on Pakistan and India to avoid escalating tensions, expressing to his Pakistani counterpart "deep concern" over the Kashmir crisis amid fears aerial battles could snowball into an all-out conflict.
Pakistan aviation authorities said the country's air space would reopen as of midnight Thursday (1900 GMT).
Khan is still offering dialogue and "the Pakistani leadership has effectively shown its ability to defend the country by striking back".
A United flight from Newark, New Jersey, to New Delhi was rerouted through London and later cancelled, and Air Canada cancelled flights from Toronto and Vancouver to the Indian capital.
With tit-for-tat air raids across their hair-trigger border pushing India and Pakistan closer to all-out conflict, growing worldwide concern is being fuelled by fears that the rivals are running out of escape routes, analysts say. Nevertheless, traditional business models are no longer sustainable and high-quality publications, like ours, are being forced to look for new ways to keep going. "Our jets were ready and we shot both of them down", he said.
"Today, [India] has sent a dossier. we have received it, we will examine it, and now come and speak to us on the basis of this dossier", the foreign minister said.
Modi, in his first remarks since the pilot's capture, gave a rallying speech ahead of elections in the coming months.
The comments were made in a joint news conference in New Delhi amid a serious escalation of tensions between the two countries.
The South Asian rivals, divided by the bloody 1947 partition of India, command two powerful militaries armed with nuclear weapons that remain a constant source of concern for worldwide powers.
On Wednesday evening India's foreign ministry handed a dossier to Pakistan that it claimed detailed camps of the Paskistan-based militant group that carried out the Feb 14 attack.