What you were told by this Muslim is not true and most likely he is no practicing Muslim but only by identity.
The consensus of scholars say that there is punishment in the grave and this is clear from the Quran and from the Sunnah.
Therefore, don’t pay any attention to what ignorant people say.