Fire services were struggling to put out the billowing blaze at a riverside port in Pati on the northern coast of Java island.
Three people were seriously injured in the incident, Nugroho added.
It is not clear what caused the fire. Boat accidents are common in Indonesia, a vast network of islands that relies heavily on water transport.
At least five people were killed when a boat carrying nearly 200 people caught fire in east Java in May.