[SPARK-3755][Core] avoid trying privileged port when request a non-privileged port

@pwendell, ```tryPort``` is not compatible with old code in last PR, this is to fix it.
And after discuss with @srowen renamed the title to "avoid trying privileged port when request a non-privileged port". Plz refer to the discuss for detail.