U.S. citizens and residents must pay tax on their worldwide income. There is a limited exclusion for earned income (up to $103,900 in 2018), but there is no exclusion for gain on the sale of property abroad.
A credit that entitles you to a refund even if you owe no tax for the year.