Do you have curl working to download anything or is it broken for all packages? If it is just this package what is the URL you are downloading? Is it behind a log in?
Are you doing this in a script or entirely from the command line?
What happens when you paste the URL https://somewebsite.com/packname.pkg into Safari?