Malaria is present in certain parts of Indonesia – generally more remote, jungle environments.
Check malaria maps for updated malaria zones, and make an informed choice. The fact is that most places where visitors go are malaria-free, and taking anti-malarial drugs would not be necessary, especially given the side effects many people experience.
Other mosquito-borne diseases, and notably Dengue fever, are present throughout Indonesia. There are no drugs to take to prevent these illnesses so the best option is to protect yourself from being bitten in the first place.