You might have gotten lucky, but who really knows. The ideal scenario is when you pump the tank full of gas and the truck just dies and doesn't restart. It's when you've got just enough diesel in there for the truck to run (but not stop) that you get into big repair bills. A 1/4 mile isn't much and depending on the size of the fuel filter none of the gas could have even made it into the engine. Best thing to do is drain the tank, flush the fuel lines and see what happens.
Diesel is also heavier then gas is so again, hopefully near the bottom of the tank where the fuel pickup is, nothing but diesel got pulled through the system.
Whatever you do, don't let the mechanic bend you over for unneeded repairs..