You can follow below steps in cpanel:
Login to WHM.
Click on “Modify an Account” option under “Account functions”.
Here you can find the field “Primary Domain” to change domain name.
One more thing your username also can be changed with your primary domain name.
At last, click on “Save”.