Hi everyone,
here's the question,

when I was doing the practice on my English book,
I wrote:

"I had been living in Ontario for two years."

however, the correct answer is:

"I had lived in Ontario for two years."

I was wondering that why I can't use "had been living" in this case?

because in the sentence it states "for two years",

doesn't that mean a duration or a period of time (which "have been + V-ing" indicates)?

Thanks!