You will need to purge the entire fuel system first. What's in the injectors will be tougher but after clearing the tank and re-filling with gas, pull the fuel line off the fuel rail, rig it to dump into a bucket and turn the key on. Run the pump for at least a 1/2 gallon to ensure the filter is clear of diesel and re-connect the fuel line to the rail. Now the spark plug will be fowled with diesel so pull it and clean with acetone, carb spray...something that will cut the oil off and dry clean. While the plug is out turn the key on until the pump stops, then crank it over for at least two- 15-second bursts. This will get gas into the injectors. Now one more problem to get past is all the diesel in the cylinder. You need something to get burning before it fowls the plug again so drop some gas into it through the plug hole or shoot some starting fluid in, then reinstall the plug and hit the starter. When it starts it will smoke like there's no tomorrow but that's the diesel. Your task is to keep it running long enough to clear it.
OK, good luck. Also, if yours machine has an O2 sensor, it will probably need replacing now.