You could try downloading it to USB and try that from safe mode https://www.playstation.com/en-gb/get-help/ps4-system-software/
You could give option 5 a go while you're in there. It may do nothing in this case, but it's been known to fix some fairly diverse issues.
What happens when you start the PS4 normally (apart from the error code)?
If all else fails, you may unfortunately need to initialize the console, re-installing the full system software (as detailed in the very last section of the page linked above)