Γιατρός or ιατρός?
That's right! Those are the two possible spellings.
But why is γιατρος wrong here?
Possibly because you left off the accent -- I'm not sure how strict Duolingo is with that.
Otherwise -- what was the entire sentence that you wrote?
Just γιατρος obviously is not a translation of "He is a doctor".