[SPARK-3755][Core] Do not bind port 1 - 1024 to server in spark

@pwendell, ```tryPort``` is not compatible with old code in last PR, this is to fix it