This is the perfect scenario for a Global Tool Configuration. From the Jenkins home page, Click Manage Jenkins -> Global Tool Configuration. If you have a default installation, this page will let you add multiple configurations for installing Maven on your build servers.
Once you've configured the tools, you can use them in your jobs by adding "Invoke Top Level Maven Targets" build steps. If you are using specific slaves/nodes for each job, you can pick the Maven that should be installed on each server. Then when the jobs run, Jenkins will manage the installation for you automatically.
Specifically for pipelines, there's the Pipeline Maven Integration plugin. I haven't used it but from the docs it looks like it should be able to do what you're asking:
Provides Maven integration with Pipeline Plugin by using the withMaven
step, which configures a maven environment to use within a pipeline
job by calling sh mvn or bat mvn.
And this blog post, Declarative Pipeline for Maven Projects, give a good example of configuring Jenkins to run a pipeline with Maven.