For every NC, the infrastructure master is determined by the value of the fSMORoleOwner attribute on the CN=Infrastructure object of the NC.
For instance, the infrastructure owner for DomanDnsZones is specified at the fSMORoleOwner attribute of CN=Infrastructure,DC=DomainDnsZones,DC=contoso,DC=com
When the infrastructure owner of a non-domain naming context (NDNC) such as DomainDnsZones is not available, changes to this object have to be done at the infrastructure master of the domain NC. Any attempts to modify this object on another DC will return error WILL_NOT_PERFORM, as a safeguard against conflicting changes to the FSMO role ownership.
To resolve the error and continue with the demotion, use ADSIEdit to set the fSMORoleOwner attribute of the NDNC (for example, the object CN=Infrastructure,DC=DomainDnsZones,DC=contoso,DC=com) to the NTDS Settings object of an available DC. (note that the attribute must point to the NTDS Settings object and not to the Server object). For example:
CN=NTDS Settings,CN=DC-03,CN=Servers,CN=PDC-Site,CN=Sites,CN=Configuration,DC=contoso,DC=com
Once the change is made and it’s replicated to the DC being demoted, the DC is able to contact the new FSMO owner, replicate the changes successfully and finish the demotion without issues.