So your token is good, that’s good.
I personally used the Request library (https://www.npmjs.com/package/request), so my code is a bit different than yours, but since you get a 404 it seems like your URL is what’s wrong…
Did you play with it a bit?
maybe add `https://` to `host: ‘api.appstoreconnect.apple.com’,` ? sounds trivial, but it must be a tiny mistake like that.