Yes, paying 400 million for prisoners in Iran definitely seems like a ransom payment. This may cause rebels within the country to try to take more hostages so that they can get more money. Although countries normally do not negotiate with terrorists, it is important to negotiate when human lives are at stake.
Not only was it a ransome payment, but it sets a dangerous precedent. Paying for these prisoners just makes it more difficut and more dangerous for people in the future. If we pay for prisoners now it puts more people at risk for being held prisoner or being kidnapped in the future.
Though countries may claim to not pay ransom, big countries like the US often do. They may couch it in terms of political favors, prisoner exchanges or trade agreements, but it's a form of ransom, it's just paid to a government rather than an individual kidnapper. Comes from being among the richest countries, I guess, and not wanting the citizenry to feel unloved.
We owed Iran money and may have held up that payment itself until the hostages were released. Some may consider that ransom in and of itself, but it does not meet the legal definition. They wanted their money, we had it, and we gave it to them once certain conditions were met.