The MATLAB Job Scheduler uses multicast to make the cluster discoverable. You could block multicast traffic on your head node firewall to prevent this. How you actually do this depends on what firewall software and OS you are using.
If you just don't want people to be able to use your cluster, but you don't mind them seeing that the cluster exists you could use security level 2 or 3 and set the allowed users in the mdce_def file with the ALLOWED_USERS setting. See this documentation page for a description of the security levels: https://www.mathworks.com/help/mdce/set-mjs-cluster-security.html
If you do that, then only the users in the ALLOWED_USERS list will be able to use the cluster.