Scottish clergyman invited to preach at Balmoral said the monarch had been in “amazingly good form” just days before her death.