Version 5 and Java not working

Please format your code using </> icon as explained in this guide. It will make your post more readable.

I just checked on my end and as soon as I add the following in my pom.xml file:

<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>transport</artifactId>
    <version>5.0.2</version>
</dependency>

I can write this code:

new PreBuiltTransportClient(Settings.EMPTY)
      .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 9300)));

If it does not work on your end, then check your IDE, your maven settings, look at eclipse messages.

What does mvn dependency:tree is saying?