It will work, but not well,
Coal is a solid that burns with a relatively low flame temperature that fills most of the firebox with an incandescent bulk. The bulk warms the whole firebox and boiler crown by radiation. The coal provides a lot of heat, at moderate temperature, applied evenly to the whole structure.
In contrast, a gas burner in a coal firebox provides a concentrated hot flame likely to overheat the top of the firebox, whilst its very hot exhaust flows too quickly through the tubes to transfer heat efficiently into the boiler water. Just sticking a gas burner into a firebox designed to burn coal is inefficient and might overheat the boiler in one place whilst the rest of it stays cool, and most of the heat escapes up the chimney.
The combustion chamber of a gas boiler is designed rather differently to a coal firebox. It makes sure the hot gas is spread across the structure, avoids hot spots, and slows down the exhaust so more heat gets into the water.
Rather than redesign the firebox, I suggest putting several firebricks inside (the type made to store heat) the firebox, and heating them with a gas ring underneath. They will take longer than a pure flame to come up to temperature and raise boiler pressure, but the heat will be spread around the firebox in much the same way as coal. The bricks will also reduce the exhaust temperature, slowing down gas flow through the tubes so they work somewhat more efficiently.
Rough guesstimate from IMLEC numbers: 200W power out at the drawbar from a 2% efficient loco, which is a very good one, implies a 10kW burner, which is a lot more that a DIY store cartridge blow-torch produces, perhaps 1kW. So several DIY store blow-torches would be needed, or an equivalent gas ring. From memory, I believe the rings on a domestic gas-cooker top are about 600W (small ring) to 2kW (big). Note though that a blow-torch produces a single big concentrated flame, whilst the rings have many small flames. To see the difference, try boiling a saucepan with a blow-torch! For this purpose, the concentrated heat from a torch is unsuitable, and much more wasteful than a ring. Same issue inside a traction engine boiler.
My IMLEC guestimate is based on the heat needed to run a loaded loco round a track at reasonable speed. Rather less heat will be needed just to turn a flywheel over in a workshop, in which case, a couple of blowlamps worth of heat applied for longer, raising steam slowly, might well be “good enough”.
For rough work, like raising steam for a test, a sufficiently big gas burner of any type given time will do the job, but far from ideal. If the engine were to be run permanently on gas, the firebox would have to be redesigned, and would no longer burn coal, unless designed as a hybrid. Not simple. Better to copy an existing gas design than start from scratch.
Dave