Unfortunately the fixes in 42.2.17 weren't quite enough to fix the problem with gssEncMode. 42.2.18 has (hopefully) fixed them. See the details in the [release notes](https://jdbc.postgresql.org/documentation/changelog.html#version_42.2.18)
PostgreSQL JDBC 42.2.18 Released
JDBC Project via PostgreSQL Announce Sat, 17 Oct 2020 02:58:57 -0700