The UK Government has confirmed the levy on oil megaprofits will end in 2030.