Effect of the variation of mass on fermion localization on thick branes