Can you tell us more about your platform? Do your requests go through a proxy? Are you running k6 with Docker? Do you get the same error with http.get('https://test.k6.io');?
If you can share the command you use and a bit more details about your environment, we might be able to help you troubleshoot.
curl https://test.k6.io from your VM. Does it work? My thinking is that the browser might have a proxy configured, for example. That allows the requests to reach https://test.k6.io.
What version of k6 are you running? You can check that with k6 version.
Try http.get('https://test.k6.io');, though I expect it will probably do the same.
Running k6 in debug might help you compare the request/responses. Execute k6 run --http-debug script.js. And compare with curl -v https://test.k6.io.
I hope this helps. It does seem to be an issue related to the VM having access to https://test.k6.io and somehow receiving a response that looks like it comes from http://test.k6.io. But it is difficult to tell without seeing your VM.