Inflation in the UK stayed at 2% last month, new official figures showed.