The verses before and after the verse of ghadeer, it looks clear that Allah talks about Jews and Christians as it mentions torah and gospel. So how can we say that the verse was about Imamat of Imam Ali (as).

The verses in Quran before and after were not all revealed at same time.

I suggest that you read the book alGhadir by Allama Amini. The book is summarized in 3 volumes in English published by Ansariyan Publications