Flat was booked by me but later on I discovered that the Builder has sold the unit to somebody' elss

I had booked a 3 BHK flat in the year 2014 for which the Builder issued me the allotment letter and later on he also provided me the Builder buyer agreement in the agreement the possession of the said property was committed to be given in the year 2016 June with 6 months Grace period .In the year 2016 and 17 when I visited the site I found that the development work was very slow in this regard when I visited the builders office he told me the property will be ready in a short while.In the year 2017 and 18 I discovered that the name of the Builder got changed and some other builder was looking after the construction work despite this the original builder started sending me letters to get the registry work done although the flat and the amenities committed in the agreement were still far from being completed so I declined in going for the registration I asked them to furnish the Occupancy certificate and completion certificate of the said property which they never produced. In 2019 another builder took over the property they also started calling me to get the registration work done interestingly the original builder was also sending letters to get the registration done through them I again asked from both the builders to show me the paper as to who is is the legitimate authority to enter into the registration at the same time I also asked from both to show me the Occupancy certificate and the completion certificate which they never produced till date yesterday when I visited the site I came to know that the flat number which I had booked and for which the allotment letter and the agreement was signed by the first builder has been sold to somebody else when I contacted the present builder they told me that they don't have the records of the booking and other details of my allotment however they offered me to opt for another flat in the same tower which I declind..What should I do