Make sure that you have installed and tested Connector/J on your system: https://gist.github.com/craigvantonder/98391eb72f0e23525377ddbd89d607af/
Then read through: https://www.elastic.co/guide/en/logstash/current/installing-logstash.html
And proceed to download and install the Public Signing Key:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
You may need to install the apt-transport-https package on Debian before proceeding: