The service is set to end on June 30 for around 165,000 energy customers in Scotland.