One of my computers has been taken out of service. Can the license be moved to the replacement?
Sure,
Remove/uninstall avast from the system being taken out of service. Possibly best to also delete that device from your my.avast.com account, so the license isn’t assigned to it.
Install avast on the new system and apply the license there.