"He lived for a long time."
Translation:Han levde lenge.
Your suggested sentence is wrong. Something close in meaning to what's given in English would be: "Han levde i lang tid". But that would usually be used to tell you he lived for a long time after some accident or illness, for example: "Han levde i lang tid etter slaget" (ie living a long time after a stroke). "Lenge" means for a long duaration of time (Not elegant English, I guess, but I think you will understand. I never took English classes after the compulsory English classes in school many years ago.). In short: Stick with the given translation.