Generally speaking the problem is in a conflict of different versions of junit5 dependencies in a project. To find this conflict you’d better generate a dependency tree:
mvn dependency:tree
and check which transitive dependencies fetch the same junit5 dependencies (i.e. junit-jupiter-engine, junit-jupiter-api, etc) of different versions.
To fix the problem you would need in your pom.xml to