"I am going to St. Petersburg."
Translation:Я еду в Петербург.
A rule of thumb is something like whenever you're "going to" a place with a proper name like St. Petersburg or Moscow or Belarus or another city or country, it is assumed that you are going to be using some sort of transport (not going on foot) and so you should use ехать or поехать (when perfective is needed).
Yes. The above sentence illustrates many of the problems with this Duolingo Russian course. Almost every comment in the discussion here describes a problem with the question or lesson notes, all of which could be addressed. But sadly there haven't been any meaningful improvements to this course since I first looked at it a couple of years ago.