That article is quite old, please refer to the current procedure which can be found here: https://learn.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows
Note, your device that you are connecting in from has to be registered, joined or hybrid joined to the same Azure AD to be able to connect: https://learn.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows#log-in-using-azure-ad-credentials-to-a-windows-vm
Azure Active Directory Domain Services is something completely different, but if you want to use this instead then you will first have to disconnect the current VM from Azure AD.