The following is a map of train routes in Java Island, Indonesia. The map of the railway stretches from the gambir station in Central Jakarta to the Banyuwangi Baru train station, in Banyuwangi East Java. You can book train tickets online through the following booking sites:
https://kai.id/
https://www.tiketkai.com/
https://www.traveloka.com/id-id/kereta-api
https://www.pegipegi.com/kereta-api/
https://tiket.tokopedia.com/kereta-api/
or you can also buy directly at the nearest Indomaret and Alfamart outlets.

You may also like:
How to get to Dieng Plateau By Public Transportation
The Heartland Story of Central Java
Borobudur Temple, Seeing the high civilization of Javanese Society In the Past