"He will go to Odesa, if there is a train tomorrow."
Translation:Він буде їхати в Одесу, якщо завтра буде поїзд.
It's a bit silly to offer two different sentences, one with 'у' and one with 'в'. It doesn't add anything for the learner and indeed, is likely to confuse learners.
Anyway, strictly speaking, 'він буде їхати в Одесу' is more correct than 'у Одесу' - 'їхати У О(десу)' means that the у and о are put together phonetically, which they shouldn't be. At least not in written Ukrainian as far as I'm aware.
In any case, 'він буде їхати' seems strange in this context (though I'm happy to be corrected as my Ukrainian isn't that good) - surely it should be 'він їде в Одесу'?
Wouldn't "Він поїде в Одесу, якщо завтра буде потяг." also be possible or is it just wrong?
Your version is much more Ukrainian, no doubt. Unfortunately, Duolingo prefers a lot of modern-day russisms.