Depends on how much gas is already in the tank. Top up an almost full tank with $5 of diesel, and you may be able to get a good bit down the road. Fill up an almost empty tank, and yes, a few blocks if you are lucky.
The engine can likely be salvaged by a good mechanic, but it isn't going to be cheap.
“The engine can likely be salvaged by a good mechanic, but it isn’t going to be cheap.”
If you have an older (Pre-1990) engine with 8.5 to 1 compression and a carburetor, you might be able to drain the diesel, change the fuel filter and oil and be OK. It will just not run on diesel. If you have a new Mazda or Honda with a 14 to 1 compression engine it will be blown; maybe into pieces.