When running an upgrade on WHM, if you get the error Error: xz compression not available, then you probably have the wrong epel release installed on your machine. The fix for this is simple.
First run this to remove it
yum remove epel-release
then run this to install the proper version
yum install epel-release
Once it’s been installed with the right version, re-run the upcp and it should go through without any problems.