If India was just importing Russian oil for it’s own domestic needs that would be one thing but they are importing large quantities over that to resell at a profit. They of course have every right to do that and the US has a right to respond to that as they see fit.
Whether this is the best policy for dealing with India is another matter. I think Trump should have been more nuanced by negotiating quietly with India to at least significantly reduce their Russian oil imports instead of voicing tariff threats out loud. I mean India is correct that some EU nations are receiving Russian oil & gas. You can’t go around making up rules willy nilly like this allowing some nations to do one thing but another nation not.
Re-sell to whom exactly? The buyers are Europe and to a lesser extent, the US. The restrictions on Russian oil was formulated to deliberately allow for Russian oil to be processed in refineries with other oil, at which time it would be no longer considered as Russian. These loopholes weren't inserted by India, they were inserted by the US and Europe. India refineries have been selling to Europe and other places for years, it is just that they handle Russian oil now. A lot of the older refineries cannot handle Russian oil, which is why those countries buy from India. Turkey has been doing it too.