Section 54F, not 54, when the asset is not a house
The two reinvestment exemptions apply to different sales. Section 54 is for selling a long-term residential house and buying another. Section 54F is for selling any other long-term asset, a plot of land, a commercial property, shares, gold, and reinvesting in one residential house in India (Section 54F). So if what you are selling is not a house, 54F is your route.
The reason it matters is that 54F is written more tightly than 54, precisely because you are converting a non-home asset into a home and getting a full exemption for it. The conditions below are the price of that, and they are the ones NRIs most often trip over, because they plan as if the easier Section 54 rules applied.
You must reinvest the whole proceeds, not just the gain
This is the biggest difference. Under Section 54, you only have to reinvest the gain to exempt the whole gain. Under Section 54F, you have to reinvest the entire net sale consideration to exempt the whole gain. If you reinvest only part of the proceeds, the exemption is cut proportionately: the exempt gain is the whole gain multiplied by the amount reinvested divided by the net consideration.
So on a plot sold for two crore with a gain of one crore, buying a house for one crore does not exempt the whole gain, it exempts only half, because you reinvested half the proceeds. To exempt the whole one crore gain you would need to put the full two crore into the house. This catches sellers who assume, as with Section 54, that reinvesting just the gain is enough. The new house cost that counts toward the exemption is capped at ₹10 crore.
The one-house limit, and the NRI position
Section 54F has a gate that Section 54 does not. You cannot claim it if, on the date you sell the original asset, you already own more than one residential house other than the new one you are buying. So an NRI who already owns two homes in India cannot use 54F on a plot sale, and the exemption is also clawed back if you buy or build another house within the following one or three years.
The reassuring part is that 54F, like 54 and 54EC, is fully available to an NRI, there is no residence bar. The one hard condition is that the new house must be in India; a house bought abroad has not qualified since 2015. A practising CA checks the one-house limit, computes the proportionate exemption if you are not reinvesting the whole proceeds, and structures a Form 13 so the buyer of your plot withholds tax on the reduced, or nil, taxable gain rather than the gross price.