When you're in prison it's very hard to get transferred to another prison closer to family but it's not impossible.
An inmate themselves would have to put in a request through the prison they're housed at and state a good reason for them to be transferred to another prison either in the same state or out of state.
Most times though a prisoner will remain in the same prison in the same state and location for the full prison term unless they need to move them to a different prison for any other reasons.