Hi Sree Harshita Maddala,
It seems like the AG metadata for that group isn’t present on the secondary or the secondary SQL instance hasn’t Joined the AG yet.
Try to JOIN non executed on secondary AG (instance level). Looks like you created the AG on the primary, but on the secondary instance you must run. Without JOIN, the secondary has no local replica metadata and will throw this error when you try to join databases.
Let me know if that worked for you.
Thank You.