dottore is an academic title. In Italy everybody who has finished university with a degree ("laurea"), is a dottore. (it's not equal to the English PhD but comparable with the "master").
so you can be a dottore in architettura, dottore in psicologia and also dottore di medicina.
medico is a person who has the title dottore di medicina AND the registration in the National professional register (after another state examination).
Someone can be a "dottore of medicina" but in the same time not a "medico" (with the university degree but without the state-recognised examination).
But normally people use the words "dottore" e "medico" as synonyms.
I did sn internet search on "il mio sogno e diventare...". It appears that di is innecessary and in fact it may be common to omit it. Here is a link to some similar sentences: https://context.reverso.net/translation/italian-english/Il+mio+sogno+%C3%A8+diventare
It sounds like the best parallel is that dottore is used like you would use "doctor" in English - it's often used to mean a physician, but can also be used to describe someone with an academic degree (leading to all of the "I'm not that kind of doctor" jokes). Medico would be closest to "physician" - it's more specifically (at least in the US) an MD or DO, but in common practice, you might refer to a person as either a doctor or a physician. From the explanation above, it sounds like "medico" also means someone who has their medical license in addition to the degree.
In American English, "medic" at least some of the time means a first responder in a military context. I've never served, in my experience it is similar to an EMT (emergency medical technician), that is, someone in quite a different role than a doctor. I know someone who worked as an EMT, then studied to become a physician's assistant, and then studied some more to become an MD (doctor), to give you an idea of the difference in meaning, in the US.
This may be true in British usage, but not in the USA. At least in American usage, physician is used to mean a medical doctor, regardless of specialty. For example, a person in an emergency room waiting for a specialist could easily be told, "The physician will be here in a few minutes."
There's pretty much no British usage of physician these days, it sounds archaic to this Brit, and I suspect most others. I have been told (though how true this is I don't know) that historically physicians – who were little more than quacks back then – wanted to sound better educated, so gave themselves the title of 'doctor' to match the respected PhD qualification. This, of course, lead to PhD qualified academics considering themselves to be 'proper' doctors, having earned the title, not merely misappropriated it. And when a medical doctor qualifies as a consultant surgeon they drop the title Dr, becoming Mr/Mrs again to distinguish themselves from mere doctors/physicians. And thus ever rolls the the wheel of British snobbery.
Several people have suggested this, Verena, and no one has responded with a careful explanation. While this sentence has the same meaning as the offered Italian, it is not the most faithful translation. You have introduced a new subject to the your sentence, "it", where the subject of the Italian sentence is "Il mio sogno", "my dream". DL is pretty consistent about this, if there is an English sentence with the same meaning and the same subject, that is the sentence that DL wants. Of course sometimes that is awkward. One example over which much ink has been spilled is "Ai miei genitori piace la birra." The literal translation that would preserve the subject is "Beer is pleasing to my parents," or "Beer pleases my parents," but DL wants the more common and natural English, "My parents like beer," which switches the roles of subject and object. In this case, though, "My dream is to become a doctor" is a fluent English sentence (I guess I'm disagreeing with Ulla here.) and preserves the subject, so that is what DL expects.
I'd say that this is just typical DL persnickety-ness. Duo wants you to not include a modifier ("medical") that it hasn't also included. Further up the thread you'll see discussion of the appropriateness of the translation of "medico" to "doctor", which is imperfect. Not sure whether DL continues to reject "medic" and "physician" as alternatives. I would say your translation (or the commonly used abbreviation MD) is faithful, and we should push for DL to acknowledge that.