Worker not able to connect to a server running on a network load balancer

I have a worker running and trying to connect to a server running on a network load balancer.

Here is the code :

async function sendToOtherServer(request, response) {
const url = ‘http://.elb.us-east-2.amazonaws.com:/alive’
const otherServerRequest = new Request(url, {
method: ‘GET’,
}),
headers: {
‘Content-Type’: ‘application/json’,
‘Accept’:‘/
},
});

try {
console.log(“In try catch code block”)
const otherServerResponse = await fetch(otherServerRequest);

if (otherServerResponse.ok) {
  console.log('Request sent successfully:', otherServerResponse.status);
} else {
  console.error('Failed to send request. Status:', otherServerResponse.status);
}

} catch (error) {
console.error(‘Error sending request:’, error);
}
}

In this code the worker tries to connect to the NLB but gets an error code 522. I have tried accessing the same URL using postman and it is working but wont work through worker code.