I think I finally found the problem - I was setting the server's public IP in the IP address field. Then, when I "just hit enter" as suggested, it worked. Amazon's DNS as hostname also seems to work just fine.
I really don't know why this is an issue, but perhaps mentioning it in the docs might help others avoid it.
I also made another, somewhat strange observation: The setup script takes considerably longer to run when the error is present (after it prints "Downloading JCE 1.8 zip file..."). This made testing it quite painful, as I had to wait a long time every time I setup the server.
Anyway, thanks for the help, it's greatly appreciated.