Did you try to update the package lists with the following command before running ?
$sudo apt update
$sudo apt install openjdk-11-jre
Which Raspberry Pi model and Raspbian version you are using?
You can find out by
$uname -a
giving output like this for RPi 3 running latest Raspbian Buster:
Linux raspberrypi-02 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
To run Java 11 on the old Raspberry Pi Zero (W) not using newer ARMv7 CPU, you have to use Zulu OpenJDK. See this forum’s discussion:
If you’re running RPi 3/3+/4, we have to dig deeper to see why you have this issue.