In IntelliJ IDEA, go to File → Project Structure → SDKs (or Project → SDK if setting for current project).

On macOS, Settings is under IntelliJ IDEA → Preferences.