I just love questions that lead us to the immediate years after WWII. A detour here: there are certain historical moments that indicate the shifting of worlds, or the overlap between the legacy weltanschaaung and the globe encounter a simultaneity of change. The Indonesian question is one of those topics that demonstrate the clashing of ideologies and the competing worldviews that are taking place in the same moment. Colonialism, imperialism, combined with Cold War mentalities, were all in play here.
The assumption nowadays is certainly that the United States was an imperialist, militaristic power that eschewed anything beyond a lust for security and anti-communism. John Gaddis has absolutely lost the public debate on how to interpret America in the Cold War. But as you point out, Indonesia is one of those instances that buck that simplistic interpretation.
American policy and views towards Indonesia takes on greater importance after WWII, with the Netherlands recovering from the war and therefore dependent on US aid. In some Indonesian nationalist groups, US military officials had built relationships with anti-Japanese guerrilla leaders who then started their own rebel groups against the Dutch. But even back in DC, there is a mix of views, with some newspapers questioning the stability of a post-Dutch national government and others wary of being drawn into supporting a colonial oppressor. I want to emphasize that there is a strong anti-colonial valence cutting through US foreign policy debates at the time: FDR had outlined his trusteeship scheme explicitly as a way to peacefully transition the world away from European colonialism and the UN, designed heavily by American hands, was premised on Wilsonian notions of equality among sovereign nations (as opposed to empires.) In debates about security arrangements for East and Southeast Asia, US officials were highly cognizant that putting the UK and France into a security arrangement with newly-independent nations would put the US at risk of accusations of supporting a new form of colonialism. So, stability was a concern, but so was taking seriously the abuses of the Dutch colonial regime.
Point is, the debate about whether Indonesia should be independent from the Dutch was contentious in the US foreign policy world late 1945-46. The Truman administration initially made the move to continue sending aid to the Dutch, but also use that aid to apply leverage onto Amsterdam to move them towards using more peaceful methods of dealing with Indonesian rebels. Even as tensions with the Soviet Union ramped up through 1946 and 47, the US continued to make neutral calls for a mediated resolution to Indonesian-Dutch violence.
The Dutch used particularly violent and brutal methods in their war to keep control of the East Indies, which soon turned opinion in the US and elsewhere against them. A New York Times article from Dec 27, 1947 reported that US policymakers were concerned that "Dutch actions in the East Indies [had] offered the Communist Information Bureau a magnificent propaganda gift on a silver platter." In other words, thinking in Cold War terms was pushing the Truman administration to retract support for the Dutch, not the other way around.
Furthermore, the US was increasingly impressed by Sukarno and his republican nationalist movement. In late 1948, leftist and Communist groups launched an internal rebellion in areas under the nationalist government's control, which Sukarno's faction crushed. Sukarno was clearly not a Communist sympathizer from US views. Therefore, it wasn't likely at all at the time that a non-European government in Indonesia would build ties to the Soviet Union. But supporting Dutch colonialism would hurt America's image abroad and ruin an opportunity to build close ties to an effective, nationalist, non-Communist Indonesian leader.