A problem for the Germans is when do you convert your gasoline based motor transport system to diesel? Granted rail was still well over 90% coal and river traffic was also mostly coal. But light/medium trucks? And you need to start converting in the mid 1930s (if not earlier) without disrupting production too much.
The German synthetic fuel plants were mostly using the Bergius process. Which is good for producing decently high octane gasoline; the B4 avgas was AFAIU more or less straight Bergius process output + a smattering of TEL (and lead scavenger, ethylene bromide maybe?). However, if you want diesel-type fuels the Fischer-Tropsch process AFAIU can produce fuel with considerable less capital outlay than the Bergius process can produce either gasoline or diesel. So if Germany wanted to pivot to diesel, it's not only about developing the engines but probably they would need to build more Fischer-Tropsch plants instead of Bergius plants. They would still need some Bergius plants for AVGAS production, and for whatever land-based gasoline demand was remaining (cars & motorcycles etc. even if trucks and tanks were running on diesel?). But they could probably save quite a lot of capital cost with this change. In any case, if it's going to have any impact on WWII yes they would need to start many years previously. At the very latest the moment the nazis take power they would have needed to start the diesel transition.
As for railways and river barges, by all means continue with coal. Works well enough, and is not dependent on capital intensive synthetic fuel facilities.