Taking this one step at a time.
If you have an engine that has been flooded (submerged) in water.
First thing would be dry out the electrical system (if in a vehicle)
Pull all the plugs, drain/replace the engine oil and filter.
Crank the engine over to ex-spell the water out of the cylinders.
Spray WD-40 in each cylinder to displace any moisture still in the cylinders.
Reinstall fresh plugs, start the engine, if it runs normally, let it reach operating temperature.
Then do another oil and filter change.
Diesel just sitting in the oil sump,will not absorb the water.
JMHO, better to disperse the water into engine oil when running (milkshake)
I would not suggest putting diesel fuel in a transmission ever.
Better to cycling fresh transmission fluid.