World number one Scottie Scheffler finished seventh, while a struggling Rory McIlroy ended the major on 17th.