Dissipative ground-state preparation of a spin chain by a structured environment