A 58-year-old man presents with difficulty swallowing solids, which has progressed over 3 months, associated with weight loss of 6kg. He denies heartburn. He is a smoker of 20 pack-years. What is the most appropriate next investigation according to NICE urgent cancer referral guidelines?