You sometimes see military vehicles running in "extreme" conditions, and these conditions can include deep submersion during river fording. Creating a vehicle that can run submerged is a challenge -- In order for any type of combustion engine to run it must have a source of air, and it must be able to release exhaust gasses. If the water is not too deep (a few feet), the exhaust gases can take care of themselves because they are under pressure. The air intake is usually the problem -- as soon as you submerge the air intake, the engine can no longer get air and it will stop running.
You can get around the air intake problem by adding a snorkel. Military Humvees often have a snorkel attached, and it allows them to submerge in up to 5 feet (1.6 meters) of water (see this page for some nice pictures of a typical snorkel). In order to handle submersion like this the engine and the rest of the vehicle must be waterproofed. So your question changes into, "Is it easier to waterproof a diesel engine than it is to waterproof a gasoline engine?"
To waterproof any off-road vehicle, there are lots of different things to think about. For example:
Assuming that all of these other things have been taken care of, and assuming that the engine is waterproofed, then the vehicle can run underwater.
In general, it is easier to waterproof a diesel engine than it is to waterproof a gasoline engine because of the sparkplugs and ignition system in a gasoline engine. These components run at high voltage and sealing them is harder (but not impossible). A diesel engine, on the other hand, has no ignition system (see How a Diesel Engine Works). If the diesel engine has a mechanical fuel pump for the injectors and a mechanical transmission, there are also no engine control electronics to worry about. These features can make a diesel engine relatively easy to waterproof. That's why most military vehicles that ford rivers or run submerged have diesel engines.
AutoTypes of EnginesHow Diesel Engines WorkAutoHybrid CarsIntroduction to How Diesel-fueled Hybrids WorkAutoTypes of EnginesDiesel Engine PicturesAutoTypes of EnginesHow Diesel Two-Stroke Engines WorkAutoEngine PerformanceHow Diesel Fuel Injection Systems WorkAutoFuel ConsumptionIs diesel fuel better for the environment?AutoAuto BasicsDiesel Fuel Storage RegulationsAutoAlternative FuelsAfter Volkswagen: Where Does Diesel Go From Here?AutoFuel EconomyDoes a diesel engine equal fuel cost savings?AutoExhaust & EmissionsDiesel Isn't Always a Worse Polluter Than GasolineAutoHybrid TechnologyCalifornia Proposing Ban on Gas and Diesel CarsAutoTypes of EnginesIf diesel engines are more efficient, why do most cars have gasoAutoAlternative FuelsWhat's the difference between gasoline, kerosene, diesel, etc?AutoTypes of EnginesIs it true that a diesel engine can operate under water while aAutoTypes of EnginesDiesel Engines vs. Gasoline EnginesAutoTypes of EnginesUnderstanding the Cycle - The Diesel Two-Stroke CycleAutoEngine PerformanceWhy do big diesel engines and race car engines have such differeAutoAlternative FuelsWhat if I put diesel fuel in an automobile that required unleaded fuel?AutoTypes of EnginesDiesel Fuel - How Diesel Engines WorkAutoTypes of EnginesDiesel Fuel InjectionScienceEngines & EquipmentHow Diesel Locomotives WorkHistoryPost WW IISteam Versus Diesel