Shouldn't the warning message for meant to say http2 parameter being deprecated not http2 directive?
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in
should be
nginx: [warn] the "listen ... http2" parameter is deprecated, use the "http2" directive instead in