If you're running the job on an agent, then assure that vncserver is installed on the agent.
If you're using a static agent that is provided by a Docker image, then modify the Docker image of that agent to install vncserver in the agent. Label the agent to remind you that vncserver is installed on the agent, then define the job to only run on agents which have the matching label.
If you're running inside Kubernetes, then you can use the kubernetes plugin to define the specific docker images to be used in the build.
If you're running the job on the master, then you'd need to create a Docker image derived from the base image you're using.
This question really belongs on the user list. If the answers I've offered above are not sufficient, please raise the question on the Jenkins users mailing list. More people are subscribed to it, more are likely to answer, and it avoids distracting the Jenkins Developer mailing list with questions that are not related to the development of Jenkins.
Thanks,
Mark Waite