The opposite there. Sanjay Gandhi thought the IAF wanted Viggen and were instead having the Jaguar pushed on them until the IAF convinced him otherwise. At the time, the Jaguars were our only real option. It was the only twin engine jet and was also nuclear capable. All other jets, F1 and Viggen, were not.
As for HF-24, it had a good run, but the engines did not have afterburners and the aircraft was subsonic only. There was a plan for HF-24 Mk2 which did not materialize because the engine available was too expensive. The actual Jaguar competitor was the HF-24 Mk3, or HF-73, which failed after the Germans backed out.