First of all, it is essential to establish the role of the bank in this transaction. If the bank is acting as a deputy of the state in selling the land and collecting payment for it, there is nothing wrong with that. Or if the bank has purchased the land from the state in a genuine transaction, then it sells it by instalments, there is nothing wrong with that either.
Shaykh Ibn Baaz (may Allah have mercy on him) was asked about the ruling on buying an apartment from the bank by instalments.
He replied: There is nothing wrong with buying the apartment from the bank by instalments on condition that the contract with the bank for purchase of the apartment is not done until after the bank has bought it from its previous owner. If the bank has purchased it and it has become the bank’s property, then it is permissible to buy it from the bank for cash or for a payment at a later date. End quote.
But if the role of the bank in this transaction is to finance it, whereby it gives the state the price in cash, then gets it back from the customer with something extra in instalments, this is riba, so this transaction is haraam in that case.
If your name was not drawn and the bank gives back with interest the deposit that you paid, then you have to get rid of this interest by spending it on various charitable causes, such as giving it to the poor and needy and so on.
Shaykh Ibn Baaz (may Allah have mercy on him) said:
Whatever the bank gives you of interest, you should not return it to the bank or consume it yourself; rather you should spend it on charitable causes, such as giving it to the poor, renovating public washrooms, helping debtors who are unable to pay off their debts… End quote.
Majmoo‘ Fataawa Ibn Baaz, 19/268.
And Allah knows best.