Stellar populations of early-type galaxies in different environments - III. Line-strength gradients