Distribution certificate - private key not installed

My distribution certificate is expired. So I deleted the old one and created new certificates manually. I have added the downloaded cer file to the keychain. Also updated the provisioning files with the the newly created one. When i try to generate the ipa for adhoc, i am getting some error message like you have one distribution certificate but the private key is missing or not installed. I created the csr file and generated the certificate manually. So i am not sure why the private key not installed error is coming. Any idea?

Nb: There is no other distribution certificate in the developer portal other than the one i created. I tried couple of solutions including creating the certificate using Xcode. But that didn't worked.
Distribution certificate - private key not installed
 
 
Q