Thank you, @tristup . The reason why the first link is not working is that we used a custom URL which is not being updated in the server(I guess). And the rest of the links are present in ‘plain’ format, that’s why they are working.
Take this link for example: https://www.truepush.com/blog/api-integration-for-android-studio/ Even when we change the permalink settings the URL is not getting updated and the link remains broken.
Still trying to figure out a full-fledged solution. Will definitely take your pointers into consideration and let you know if they worked. Thanks again!