@Gopi ReddyIrala are you using LDAPS or LDAP on the identity provider configuration? For me it only worked with LDAPS. At some point I think that I also had an error regarding an invalid certificate in my AD, so we had to fix it as well.
Additionally, we had to modify a Java config file inside the gateway because it was complaining about our AD URL. It had to do with some Java newer restrictions on LDAP URL naming scheme. To solve this issue, we had to set the following option: "Dcom.sun.jndi.ldapURLParsing=legacy". Unfortunately, I don't remember exactly which file we had to modify.
Other than that, it looks like you are doing exactly what I did: the new password had to be within quotes and base64 encoded with the "character encoding" option set to "UTF-16LE", although I'm not sure if this specific encoding is related specifically to my environment
I am sending a screenshot of how my "Write LDAP" assertion looks like.
The identity provider must also be configured with the option "Allow updates from" checked, but I suppose you already have it done because otherwise it would probably not even show as a valid option in the "Write LDAP" assertion