Logstash is failing with syntax error

That would suggest that your configuration file is not

input {
  beats {
    port => 5044

but is actually

input {
  input {
    beats {

In which case remove one of the “input {“ lines.