Shimano made a couple of 10-speed only road hubs including the Dura Ace 7800 and the first series of Dura Ace and Ultegra 10-speed prebuilt wheels. These freehub bodies had taller splines and would only accept 10-speed cassettes that had deeper groves to match. The 10-speed cassettes would also fit on older 8/9/10-speed freehub bodies.
Your SLX HG62 cassette is one of the new Dyna Sys 10-speed MTB groups and Shimano may have reverted to the older shallow groves used on pre-10-speed cassettes. If your Ultegra hub is one of the 10-speed only designs, that may explain why the HG62 won't fit.