Build Failing due to nuget not being able to connect to remote server

My jenkins server has proxy configured at hostname:80. I am trying to build a C# project using msbuild plugin and nuget. When I trigger a build, it fails with the below message. Unable to load the service index for source An error occurred while sending the request.

My Nuget configuration is as below:

<?xml version="1.0" encoding="utf-8"?>
    <add key="http_proxy" value="https://myhostname:80" />
    <add key="" value="" protocolVersion="3" />

Can someone please suggest a solution?