The ESP8266WiFi library is bundled with the ESP8266 core for Arduino boards platform. When you install the platform, you install the library too. The libraries bundled with platforms are only accessible when you have one of the boards of that platform selected from the Arduino IDE's Tools > Board menu. So likely the cause of your problem is that you have a non-ESP8266 board selected.