KRs 1914 is clear that anyone sentenced to imprisonment or hard labour (KRs use the words penal servitude) will serve his sentence in a civil prison. I have no doubt that the same policy applied in the 1880s. Therefore after he was sentenced to hard labour I don't think he would have been held for long in military detention, and he certainly wouldn't have been after his discharge from the Army.
The only exception might have been if he decided to appeal his sentence, in which case it is likely that he would have remained in military detention while the appeal process was underway. The fact that has sentence was reduced from 5 to 2 years was not as a result of an appeal; it was normal practice to review all Court Martial sentences. He was being punished for a military offence (false enlistment) and since the Court Martial also sentenced him to be discharged there was less of a need to make an example of him for the sake of deterrence, than would have been the case if he had been due to return to the Army after serving his sentence.
Much the same policy applies today. Any soldier awarded a sentence over 2 years is automatically discharged and will serve his sentence in a civilian prison. Those with lower sentences and who are not recommended for discharge, will undergo military detention. Up to about 14 days will be served within the soldier's own unit's guardroom; and sentences between 15 days and two years will usually be served at the
Military Corrective Training Centre (MCTC) at Colchester. The regime there is very much the same as a recruit training centre, with the emphasis on rehabilitation and basic military skills.