In Hanafi fiqh, there are two general principles at play here:
- Goods bought with the express intention of resale are considered stock-in-trade, and thus zakatable.
- Goods bought with the express intention of keeping and/or using it, rather than selling it, are not considered stock-in-trade, and thus not zakatable.
Your confusion lies in the fact that you're purchasing this land with the express intention of both. Exactly how it plays out depends on the circumstances involved:
If your intention is to purchase the land for later resale, retaining it only for the purposes of selling it "at the right time" when you can make more profit (i.e. speculation) then it is considered to be a stock-in-trade even during the years when you are not selling it, and it would be zakatable.
If your intention is to purchase the land, using it as either an investment (e.g. deriving income from leasing) or for your own use (e.g. actually living on and/or working the land yourself) and only selling it off when you're "done with it," it would not be considered a stock-in-trade and is not zakatable.
The difference between these two scenarios is that in the first case, the land was purchased with the sole intent of resale, and it was not bought for any other reason: This is the definitive trait of a stock-in-trade. In the second case, even if you sell it later for a profit (even if you intended to sell it later for a profit) it is still not considered a stock-in-trade because it was bought with the intention of use and not for the sole purpose of resale.