The man was accused of attacking a female correction officer at a different prison earlier this week, officials said.