The evolution of surface magnetic fields in young solar-type stars