Her husband has been in prison for three years.
Couldn’t you say: “Su marido lleva en la carcel tres años”?