Core.retrieveXPathQueryEscaped was deprecated in Mendix 7. The replacement call is Core.createXPathQuery.
https://apidocs.rnd.mendix.com/7/runtime/com/mendix/core/Core.html#createXPathQuery-java.lang.String-
You’ll need to refactor the query syntax you are using, but it’s very similar.
If this error is coming from a Marketplace module, try looking for the latest version of the module there and upgrading to that.
Good luck!