Sanji used IJ hell memories along with two other attacks, on Luffy's balloon body, to increase force to send Mars flying.
It only hurt Luffy a little.
G5 has high resistance to blunt force attacks even with haki, so physical force not doing much to him can be chalked up to that.
But Luffy didn't mention anything about heat, and has no special resistance to heat.
In contrast, Kaido's magma-esque flames were hot for him even with haki, and he would've melted if not for advanced haki