Inflation has hit the Bank of England’s target for the first time in almost three years.