There are a few reasons why you may be getting this error. Please try the following steps to resolve the issue..
1) This error can be caused by an anti-virus or security program interfering with the MATLAB installer. Please try disabling any anti-virus you may have running and then try to install again.
2) There may be an issue with the target installation directory. You will want to try installing into a new directory that did not previously exist on the system.
NOTE: Please remove the folder in the following path as well: C:\Users\<username>\AppData\Local\MathWorks\MATLAB\R20XXx
3) If you installed a prerelease of MATLAB, cancel the installation and remove the existing prerelease installation. Once the previous prerelease installation folder has been removed then start the installer again.
4) If you are installing R2018a and older, the files that you downloaded may be corrupt or incomplete. Delete all of the installation files on your system, and download your products again from your MathWorks Account.