Does the transfer of energy take place when you push a huge rock with all your might and fail to move it? Where is the energy you spend going?
Law of conservation of energy
Hence, there is no transfer of energy from the body to the rock when you push with all your might. The energy you spend is getting converted to heat energy.