You can take train to Purwokerto and continue the journey with bus.
There are 7 daily departures from Jakarta Gambir Station to Purwokerto. Choose Executive class (equivalent to Aircon Economy on KTMB) for your comfort.
There are lots of connection from Purwokerto Bus Terminal to Cilacap Bus Terminal.
You can also opt to take direct bus service to Cilacap.
There are 3 bus companies with different departure points in Jakarta:
1. Sinar Jaya, depart from Kampung Rambutan bus terminal (East Jakarta)
2. Gapuraning Rahayu, departs from Lebak Bulus (South Jakarta)
3. DAMRI, departs from either Kemayoran (Central Jakarta), or Kampung Rambutan.
You can go to either of this intercity bus terminal by DAMRI airport bus from Jakarta airport.
Either of this will take more time (the bus journey is not the most comfortable in Indonesia), so alternatively, you can spend the night in Jakarta and catch the morning train to Cilacap.