Some viewed the war as inevitable with the US, but couldn't the Japanese Empire invade Indonesia for its oil rather than fighting the US?
As /u/Chamboz points out, Japan did invade Dutch Indonesia, in fact that was always the goal area for the early campaigns.
Japan added the US to the target list for two closely related reasons. First, they believed that war with the US had become more or less inevitable. Better to attack the US on a Japanese schedule rather than waiting for the US to properly prepare. Given another few months to prepare, MacArthur expected to have nearly 200,000 trained men, the equivalent of an armored division's worth of tanks, and hundreds of planes. If war was inevitable, better to have it early against an unprepared US, rather than against a US that was already visibly preparing for war. The longer Japan waited for war the better off the US was going to be. For example the US already had rough parity with Japan in carrier strength in late '41. But they had begun a building program that would triple carrier strength; a program that would radically accelerate once war started. The US put 5 CVs and 7 CVLs into the water in the first two years of the war, equaling the existing Japanese fleet. Against that Japan added precisely zero carriers CVs / CVLs. Going to war soon was imperative to Japan. The longer they waited the more likely it was they would be swamped. The US had more men and more industry. Fighting the US in 1942 was already going to be hard. Fighting them in 1943 or 1944 was going to be increasingly untenable.
The second reason is related, the Philippines made supply lines between The Dutch Indies and Japan entirely indefensible. Naval and air bases in the Philippines could interdict any oil coming from the Southern Resource Area. If there was any chance that the US and Japan were going to go to war, it would be an absolute necessicity to take and hold the Philippines. As mentioned the US was rapidly reinforcing the area, which meant if Japan wanted to take it, they had to do so sooner rather than later.
Now was the Japanese assumption that war was inevitable correct? No one really knows. By late 1941 the American public was still largely opposed to war. But they were increasingly favorable to the idea of some sort military action. And the polls shifted toward a pro-war majority every time an Axis power took an aggressive action. Roosevelt himself had become obviously pro-intervention. It's impossible to predict when or if the US would go to war. But yet more attacks on the British, Dutch, and other friendly nations might well have been the trigger. So correct or not, the Japanese assumption was reasonable.