The basic formula here is
FV = PV (1+i/n)nt
Where FV = future value
PV = present value
i = interest rate
t = time in years
n = frequency of compounding, i.e. quarterly compounding would be 4
For the situation here,
3PV = PV (1+.06/4)4t
3 = 1.0154t
ln3 = 4t ln(1.015)
Solving for t, we get 18.45 years