The Hippocratic Oath only applies to Jack's patients. If Jack had been helping Juliet and then they discovered the more serious problem he would have been bound to help. But there is nothing in the oath that compels Jack to help a random person. And as others have pointed out, the Oath didn't seem to stop Jack from putting Ben's life in danger to help Kate before.
Interesting turn of events though.
If Jack had
helped young Ben, he wouldn't have gone to the Others to become who he is today.
So Jack's stubborn inability to change sets everything into motion.