The question is vague. However, a testator can change his will as many times as he wants and only the last will made by the testator will have any relevance.
If the terms of your sale were documented when you struck the deal, then you can terminate the agreement that you had with the buyer on the basis of such terms and in case the terms are oral, then you could issue a notice to the buyer termianting the deal and forwarding the cheque towards the amount that had been paid by him to you.
If the builder has promised free flat, you have to ensure that builder has onbtained development rights of the properrty from the owner and executed agreement for the permanent alternate accommodation in your favour. You have to ensure before vacating existing place that plans are sanctioned by the planning authority for the proposed redevelopment.