Replacing elliptic curve diffie-hellman primitive with elliptic curve cofactor diffie-hellman for specifc curves?
Just to close this question . Yes, both ( ECDH with cofactor) and (ECDH without cofactor)  give the same result if the cofactor of the curve is 1. After using another third party source I am getting the correct result. There was an issue in the code