Complex sentence: It was there that he spent the last thirty years of his life, as Captain General of the Army.
Split into simpler sentences: It was there that he spent the last thirty years of his life. He was named Captain General of the Army.