I assume this was not your primary residence that you sold. If it was your primary residence and you owned and lived in it 2 out of the last 5 years (and a few other rules), you may be able to exclude up to $250,000 of gain if you are single or up to $500,000 of gain if you are married filing jointly. Please see below for more information on sale of a primary residence.
The Exchange Rate Gain from paying off a mortgage denominated in a foreign currency is treated as a separate transaction and is calculated by translating the amount of the loan using the exchange rate at the time the loan was originated and the exchange rate at the time the loan was paid off. The resulting “gain” is taxable as “ordinary income”