A transitional deal is expected to be completed within three years of the UK leaving the European Union, according to the Chancellor.