To change RDP port number , you have to modify the following registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber.
You can perform the modification manually or use powershell or use Group Policy Preference :
Computer Configuration -> Preferences -> Windows Settings -> Registry ->select New -> Registry Item
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-TCP\" -Name PortNumber -Value 3365
Before you modify the port number , you have to check if the new port is allowed on Windows firewall. Once you complete the port change , you have to reboot the machine to apply all new settings.
Please don't forget to mark this reply as answer if it help you to fix your issue