There are actually multiple things wrong with Gollum's death at the end of LotR.
You are correct in presuming that being so near a very large pool of magma/lava would probably be fatal, if not from the extreme temperatures then likely from the toxic fumes. Of course there's a huge amount of variance in the makeup and relative temperatures of lava in different volcanoes, pre and post eruption, etc. There are truly a lot of factors that determine whether you would/could die from simply being near the lava and how long you'd have to be at what distance to feel ill effects, etc. Of course we're talking about Mount Doom which is purportedly filled with magic lava - other than that we know none of the necessary variables to say whether Gollum should have lived long enough to jump.
What we can say with absolute certainty is that the death scene itself was all wrong because Gollum wouldn't sink in lava since it's about 3 times denser than a human (or whatever Gollum was) body and between 100,000 and 1,100,000 times as viscous as water. If you fall into lava you will float, not sink - at average surface temperatures of 1,100 to 1,200C (~2,012 to 2,192F), sink or float won't matter much to your survival chances, though.
Perhaps it's less cinematic if the victim slams into the surface and doesn't sink? Or perhaps the rating system demands you not show a human body char-broiling... In either case, the average portrayal is definitely inaccurate.