A decision to cut winter fuel payments for pensioners complied with the Equality Act 2010, the Attorney General has told a court.