I am trying to update name servers, and the changes keep failing. Why could this be?

There are a number of reasons that a name server change would be denied by the Registry

Client Update Prohibited Status: As an optional security measure, domains can have a Update Prohibited status assigned to them, which prohibits name server changes as well as transfers. This status is visible in the WHOIS output.

Domain in Pending Transfer: If a domain status us already in Pending Transfer, no updates whatsoever are permitted. If the domain transfer is canceled, then the update may be applied. A Pending Transfer status is visible in the WHOIS output.

Domain is in Redemption or Pending Delete: If a domain is in either of these statuses, no updates are possible for the domain. If in Redemption, the redeeming (and renewing the domain) will then allow for updates to be made. Contact Support to perform a redemption. For domains in Pending Delete, the domain must be allowed to expire completely and then registered as a new domain. A Redemption or Pending Delete status is visible in the WHOIS output.

.CA Domains - Registrant Information Validation check: CIRA does audit Registrant information periodically. If information is perceived as potentially being invalid, CIRA will contact the Registrant directly via email and locked the domain while the audit is being undergone. No updates to the domain will be permitted during this process

Invalid Name Servers: Ensure that the name servers you are assigning have been registered at the respective Registry of the domain they are being assigned to. Contact Support to validate whether the name servers in question have been registered properly.