NixOS has just switched to Gtk3 build of emacs (https://github.com/NixOS/nixpkgs/commit/bc6b91710033bfcda7f98d9baf4118db938fd2d7) so, as x2go user, I am now also having this issue (https://github.com/NixOS/nixpkgs/issues/23160). Fortunately in NixOS it is easy to create a version of a package with non-default build parameters so it was relatively easy to return to the Gtk2 build (see the snippet in my last comment there) while still tracking other changes maintainers make.

Alex