I think different people have different conditions and their own ways of picking accents. Some of them only take a few months, but others may spend years to get it. It really depends on your potential and the environment where you live. Don't worry! there will be a moment that you suddenly realize: "where did I get this accent from? When? How..."
I am kinda "changable" person though (???). In my home country, I used to have a clear-enough American accent 2 years ago, but when I've moved to New Zealand, after 6 months, I realized that I lost my American accent without knowing it

Once, I talked to an American teacher, he said: "you have a lovely British accent" (NZer accent is totally different from Brit)

unbelievable
