In order to have a past perfect you need a point in the past for reference. The finished action before that point would be used with the past perfect.
Point: I went to London in june, 2018.
Before that: I'd been studying English for three years
When I went to London in June 2018, I had (already) studied English for 3 years.