It explains it in the error - The settinghostin pluginelasticsearchis obsolete and is no longer available. Please use the 'hosts' setting instead.
Check the docs - https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts