Your description is a little bit strange because the GlassFish server can even start if port 1527 is occupied, because the Java Derby database is a separate java process. So one option could be to just ignore the message in case that the real GlassFish server is indeed starting correctly (NetBeans displays the output for the GlassFish server and the Derby server in different tabs).
Nevertheless you can try to disable starting the registered Derby server for your GlassFish instance.
Make sure that the Derby server is shut down, it can even still run if you have closed NetBeans. If you are not sure kill every java process via the task manager and restart NetBeans.
Right-click your GlassFish instance in the Services tab and choose Properties.
If instead the real problem is that either port 8080 or 443 (if you activated the HTTPS listener) is in use (which would really prevent GlassFish from starting), you have to find out which application is using this port (maybe Tomcat or something similar) and shut it down.
The error message
'Could not start GlassFish Server 4.1: HTTP or HTTPS listener port is occupied while server is not running'
just points a little bit more in this direction...