Normally I always wait with the installation of a new version of the LanguageTool extension until it is available in the LibreOffice Extension Center. But since I was curious if the error you described also occurs with my LibreOffice installation, I just installed the extension manually today.
And I can give the all-clear, at least for my system. I was able to install LanguageTool 5.6 without any problems and as after every update, I briefly tested the functionality of my LanguageTool installation with the LanguageTool test document. Using LanguageTool 5.6 does not give any error messages and the extension seems to work perfectly.
For hardware reasons, I still use macOS Catalina and not macOS Monterey like you. Therefore, our systems are probably not completely comparable. So it could be that the following is not necessarily true for your system. However, from my own experience, I know that there are some things to be aware of when using LibreOffice in combination with Java on a Mac.
It should be known by now, but still the following note up front: LibreOffice releases available from the Apple App Store don’t include Java support at all, because apps distributed in the App Store are not allowed to depend on optional functionality like Java.
According to the TDF Wiki, using macOS 10.10 and newer you need to install JDK, not JRE. You may find download links for choosing a JDK version of Oracle Java on this page.
Instead of Java 8 you could try Java 11 or Java 17. Don’t worry, there can be multiple JDKs installed on the macOS system.
According to the LanguageTool help center, it is a Mac-specific issue that additionally to Java 8 (or later) you may also need to have Java for OS X installed. On my system, it should still be installed, as this was required on my iMac Late 2013 at the time. For your newer system, however, it may not necessarily apply anymore.
Instead of Oracle Java it is usually preferable to use OpenJDK. At Adoptium you can get prebuilt OpenJDK binaries for free.
English version notes of my LibreOffice & Java installation:
Version: 188.8.131.52 / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 4; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: nl-NL
Java version: Eclipse Temurin 17.0.1 by Adoptium