Remove the "addon" domain from the account and then rename the main domain to what was previously the add-on domain.
Note however that Cpanel has had a problem for a number of years where it does not update everything that needs to be updated on domain name changes so to get around that problem, I usually **AFTER RENAMING** package the account (/scripts/pkgacct <user>) and then delete the account and restore the package to recreate the account which forces those items not usually updated to be updated new. Figured out this usually saves a lot of time over the manual edits that normally need to be done to get everything working 100% properly on name changes.