Prime Minister Boris Johnson said Britain would leave the European Union on Jan. 31 after his sweeping election win.