While they were near the lava, apparently, they generally stayed far enough away to catch fire from the ambient heat.
For information about how close you can be to lava without being injured in real life, see How close can you get to lava before burning? and How close can I get to lava and will it hurt or kill me? .
While Jedi do seem to have a higher pain tolerance (due to training and meditation), there is no evidence that Jedi have a lower flammability than other things. This seems to just be either a "physics of a galaxy far, far away", or a general conceit for the sake of the movie.
In the end, though, once Anakin has been defeated and left laying too close to the lava, he does catch fire.