The First Taranaki War against Maori in New Zealand ended a couple of weeks prior to the 1861 Census; the Second Ashanti War in Ghana would begin two years later, so in April 1861 when the Census was taken, Britain was between wars. Regiments and other units were circulated between foreign postings and British barracks. If your ancestor was enumerated in Medway in the Census, then his unit was in Britain (possibly for some years) and he was not in a war.