try:
sed '4,$ {/^$/d}' infile
start from the 4th line until end of the file, delete the empty lines.
The problem with your command is that you replace empty line again with empty string in s~^$~~g (which is same as s~^$~~) and you are not deleting it.
Note: also since you use different delimiter other than default slash /, to use this style ~^$~d you need to escape the first ~ to tell sed that is not part of your regex:
sed -e '4,${ \~^$~d }' infile
see man sed under "Addresses" about it:
\cregexpc
Match lines matching the regular expression regexp. The c may be any character.
In case you wanted to delete empty lines as well as the lines containing only whitespaces (Tabs/Spaces), you can do:
sed '4,${ /^[[:blank:]]*$/d }' infile