Analysis of a contact problem in thermoviscoelasticity under the Green-Lindsay model