You can change the ports either using WAS ISC console OR via Jython script. Either case works. If this is a one time exercise then you should change it via Console. But never attempt to change the XML files present under the config folder.
In cases Administrators do not allow editing via Console, you can create a Jython script to change it.