If you live somewhere, let's say London, for two years, and then move away, when you talk about it later, you say "I lived in London for two years". (The duration is irrelevant.)
Native speakers use the past perfect far less frequently than some teaching materials suggest they should. If the sequence of past=time events is clear, we often stick with the past simple.
I first noticed several years ago that ESL learners tend to use perfect tenses (especially past perfect) much more often than I do. I have to assume that's what they're taught.