Translation:He had never treated me so well before.
Well, in general, subjects do precede verbs in English declarative sentences. What alterrnative translation are you thinking may work? "Never before had I been treated so well by him." It works for me, but Duolingo will probably not let this pass. The meaning is, however, the same. I think it changes the sentence from active to passive voice or some darn thing.