NoNodeAvailableException error

I am able to save the data on elasticsearch version locally which runs on localhost:9200 but not on the database on my companies server. My code is what it was at the beginning and I am getting the error while only while using the database in my companie's server.

Is it because it may have a different transport client instead of localhost:9300 ?