Recipes look for specific items or furniture for crafting recipes. Lava is terrain.
You could create a furniture tile that looks like lava and qualifies as a forge, but you can’t assign the “trap”: “tr_lava”, line which makes it act like lava. So it’d be a forge but wouldn’t blister you or immolate you and all that.
You also can’t assign the lava tile as a crafting object. I don’t think there’s any terrain that functions as usable in a recipe beyond fire, light, and water sources. So, yeah. Would be an exercise in coding.