I have lived in France for 20 years. I have been living in France for 20 years.
The two above are practically the same. In both cases the 20-year period continues until the moment you utter the sentence. In the first one you're thinking about the 20-year period