Exploring the proton transfer dynamics of some hydrogen bonded heterocyclic molecules in different environments