Prof Neil Ferguson, who advised ministers on coronavirus, says he “made an error of judgement”.