The imprisonment of these citizens was unethical, and withholding debt repayment served as an effective method of ensuring the release of these prisoners. The United States does not negotiate with terrorists, nor pay ransoms for prisoners. This strategic move accomplished the goal without forceful military action that would endanger other citizens.
Withholding debt repayment to pressure Iran to return political prisoners was a diplomatic approach to a potentially volatile situation. It is always controversial when one country negotiates for the return of prisoners held in another country. The U.S. demonstrated clear compassion for the people being held prisoner and respect for the country of Iran.
It may or may not have been an effective solution, but it was not an ethical one. It is always morally and ethically the right thing to pay any debts that are owed. Using money as leverage is the same as bribery and is not an ethical or moral choice to make.
It was not ethical for the United States to use financial incentives to get back prisoners from Iran. The U.S. has long had a policy of never paying ransoms for prisoners. Therefore, this will likely make future terrorists organizations and adversaries kidnap Americans to demand a ransom fro their safe return.