Just as a matter of fact, gasoline is by definition and default not diesel fuel. This means that it will not cause a diesel motor to run, and will in fact cause it to shut down.
If you somehow overlook or forget point one, know that draining the fuel tank of the majority of gasoline is a must. Also, new fuel filters are a really good idea.
As a practical matter, after draining the tank and swapping the fuel filters, it is best to fill the tank will pure diesel fuel.
If however you are in the middle of nowhere, in a dire emergency, new transmission fluid and 2 stroke oil poured into the fuel tank after draining will suffice to get you down the road to a fuel stop.
Just in case you were ever wondering.