I can reproduce the same error with you:
It could be caused by that there is no agent in your target pool, or the agent doesn't have capability required.
Even you have installed maven, java and configured environment on the agent, you need to restart the agent, after it's connected, it will rescan the agent capability.
Check again the agent on target DevOps pool, it will display the capability required: