It is the responsibility of the Contra tor to pay Gratuity in first place to all his eligible employees ie to those have 5+ years' of service after they cease to be in employment. In case the Contractor fails to pay , it is the responsibility of the principal employer who can recover from the Contractor from his dues.
Knowingly or unknowingly, you've admitted the fact that you are changing contractors but retaining the same contract workmen which would certainly render the contract as a sham one. In such a situation, your argument that no employee has completed 5 years of service under the same contractor so as to claim gratuity pales into insignificance as they are engaged only for the same P.E . Certainly the contractor would have included his monetary liability towards payment of gratuity in his charges. Either avoid such practice of rotating the same contract labor among the successive contractors or ensure each contract covers a period of more than 5 years so that upon termination of that contract, the particular set of contract labor engaged therein are paid their gratuity.