There's Brompton Barracks - as already mentioned - at Brompton, midway between Chatham & Gillingham, currently home to the RSME (Royal School of Military Engineering); there is however a further barracks nearby, now called "Kitchener" (which is probably also, geographically at least, in modern-day Brompton),and which is currently home to some of the Gurkhas. Although definitely military, it is located almost opposite 'Pembroke Gate' - the historical main entrance to HM Dockyard, Chatham. (Now sadly, for all its "hype", a rather uninspiring tourist attraction which goes under the title of HM Historic Dockyard, Chatham).
In addition, within the same area, there is also "Fort Amherst", built in 1756, initially defend the south eastern approaches to Chatham Dockyard and the River Medway against a French invasion - now a tourist attraction.
Might I suggest, if you haven't already done so, that you do a 'google' search for Brompton Barracks (which will bring up several pages of info., including a book about its history available from Amazon) and also a similar search on Fort Amherst which will give you more detail about its history, and hopefully, allow you to narrow down exactly which barracks you need.
Of course, you don't need me to mention that Chatham Dockyard may also have housed military as well as naval personnel.