The prisoner spent years in durance vile.
durance vile
idiomA long prison sentence.
After the judge delivered the harsh sentence, the man was led away to begin his long durance vile.
Condemned for his political dissent, the writer spent the remainder of his life in durance vile, far from the world he once knew.