ERROR: Could not deserialize ATN with version 3 (expected 4) for 'Publish TestNG reports with handlebars' plugin in Jenkins

I am running a Jenkins maven job which is pre-configured to create a TestNG report using “Publish TestNG reports generated with handlebars” plugin in the job’s post-build section.

The job always fails with this error:

java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 4).

I have the following versions installed:

  1. Jenkins version 2.444
  2. JDK 21
  3. Maven v 3.9.6

How do I resolve this ATN version dependency conflict for Jenkins?