Please use https://github.com/elastic/found-shield-example with Shield to connect to your cluster using the Transport Client.
foundit/elasticsearch-transport-module
Elasticsearch Transport Module compatible with both Found Elasticsearch and the default transport
JavaNOASSERTION