Yes, even if you are a foreigner, you can legally get married to your Indonesian bride. The marriage process depends on the country where you want to marry and your citizenship. If you are a US citizen, the easiest way is to get married in the USA. You can find details on the USCIS website.