Woodrow Wilson actually said...
The United States is at liberty to withdraw at any time upon two years' notice, the only restriction being that when it withdraws it shall have fulfilled its international obligations and its obligations under the covenant of the league.
Context
Address at the Mormon Tabernacle in Salt Lake City, Utah
09/22/1919