Chosing the attribute is up to you, as there is no "matching" on-premises attribute. The example in the article uses the "c" attribute, which is the the country/region representation based on ISO-3166 (https://www.iso.org/obp/ui/#search). You can create a rule based on this attribute, or choose any other single-valued string attribute, for example one of the custom/extension attributes.
You can use any attribute from AD which is unused for any other application. I suggest msExchExtensionAttribute16 or 15 attribute from on-prem AD to be synced with Azure AD attribute preferreddatalocation.
Again after confirming with your AD team the attribute is unused by any other application.