It depends upon your definition of a 'Medway town'.
The largest town on the River Medway is Maidstone. (Approx pop. 140,000).
The largest town in the area known as Medway is Gillingham. (Approx pop. 100, 000).
But Gillingham lies on the Medway estuary, rather than on the river itself. The largest town, in the 'Medway' area, which actually lies on the River Medway is Chatham. (Approx pop. 70,000).
Those answers assume that your definition of 'largest' refers to population. If you're actually referring to areas, the answers might be different again!
Chris