Old thread, but for anyone who, like me, comes via a search: I had this problem with a Brother HL-L2340DW laser printer that was replaced with another of the same model. I didn't want to reinstall everything, so simply plugged in the replacement and set it up to connect to the network (took longer than I thought, probably better to uninstall and reinstall). After the printer was connected to the network, printing always failed. I discovered that the printer port was still set to the old value, and, as discussed here, wanted to simply edit the name to the new value. I discovered that I could change the PRINTER NAME to the new one (the NetBIOS name shown in the printer settings, based on the MAC address), but I couldn't change the PORT NAME. The printer name is used to find the printer, and is necessary; the port name is basically just for display as far as I can see. I looked in the registry and found the port name in many places, which is probably why it can't just be changed. If I really wanted to change the name I would have made a system backup, then edited the registry to replace the old name with the new name throughout; I'd expect this to work, but it wasn't important enough.
In my particular case the quickest solution to the whole printer exchange would have been to remove the printer software entirely (with the associated port name) and reinstalled it for the new printer.