If Pakistan attacks, it's because of all the money that US put in to Pakistan for Afghanistan and war against terror. If it's also only Pakistan, Russia will help in China not directly getting involved.
Geopolitics is complicated. Least you can do is remove some of the ignorance of historical relationships.
If US is not helping Ukraine, do you think it will directly help India against China?
The choice is not simple like in the west, if they don't get cheaper gas millions may die.
That said, Russia now seems to have a capricious and unstable leader. Gas prices are bad but the choice is either to stomach the high prices now or wait until Russia rips the band-aid off later for you at their own leisure.
India is slowly warming to the USA and is in the quad and other security-oriented multilateral relationships but there is very well-founded distrust of the US and a general positive feeling about Russia, its most steadfast and reliable ally ever since India became independent and pursued a policy of non-alignment during the cold war.
You would think India would greatly empathize with the plight of the Ukrainian people given that Pakistan would like to steamroll India and China would love to subjugate India diplomatically. I really don't know why India thinks this is a good idea other than that they think they could single-handedly take on both China and Pakistan without the West's help in the future.