He probably had to dump Comey and Peking Mitch McConnell pressured him to replace Comey with Wray. McConnell was the key guy who controlled approval of appointees.
McConnell probably pushed the two traitors Comey Barrett and Kavenaugh and a lot of other appointees. He and old guard RINOs like Grassley, Graham et al.
The Heritage Foundation think tank was put in charge of SC selection, iirc. Reagan was a fan of Heritage so Trump prolly thought they were a group he could trust.