Simply hop on a train from London (St Pancras station is your best bet), and the high speed line reaches Rochester in about 45m. The castle is a 10minute walk along the towns Historic High Street.
There're a couple of other things to see in Rochester while you're there - an impressive cathedral built in Elizabethan times and it's got a lovely herb-garden out the back to enjoy in the summer.