With Java 11+, you do not use the sdkmanager from tools.
Instead, use cmdline-tools.
Install the command line tools through Android Studio Preferences > Android SDK > SDK Tools and install Android SDK Command-line Tools (latest).
Use Android Studio's packaged JDK.