Judging by what I understand of your question this is pretty easy, you can create a variable called ‘on_fire_ground’ and set it to false.
And for you information, there is another signal called ‘area_exit’. You can take advantage of this and on the ‘on_area_enter’ function you can set ‘on_fire_ground’ to true and set it to false in the ‘on_area_exit’ function.
You can create a timer that will start on area_enter signal. So, in timeout signal you do damage to the player. Then check area_exit signal and stop the timer.