Just to expand on Olivier's comment, "in" has many meaning. It's what I call a can-of-worm word.
Do you mean you will go in France in 3 years time? it would be "dans 3 ans".
Do you mean you visited France in a 3 years round trip? it would be "pendant 3 ans" or "en 3 ans".