They can both mean the same thing, but “I have been living here for two years” is more precise, in the sense that it states that you are still living there.
“I have lived here for two years” doesn’t necessarily imply that you still live here, it could just mean that you have lived here for some two year period, but don’t necessarily live here now. Most people would assume that you still live here though, unless you specify otherwise.