Use wp_remote_get to get JSON instagram feed from public profile

Yes, it will do the same thing.

Taken from the official docs:

/** @var array|WP_Error $response */
$response = wp_remote_get( 'http://www.example.com/index.html' );

if ( is_array( $response ) && ! is_wp_error( $response ) ) {
    $headers = $response['headers']; // array of http header lines
    $body    = $response['body']; // use the content
}

https://developer.wordpress.org/reference/functions/wp_remote_get/

Wether it will work for you though, is a different story. If both curl and javascript are returning null, I don’t believe the problem is in the tool used to make the request, but rather what/how you’re requesting it.

If your code works everywhere, but does not work on your current host, then you need to speak with your host. Making the same request in a different way is unlikely to help.