Welcome to the Apple Support Communities
First, on your iPad, open Settings > Bluetooth, and turn off Bluetooth. Then, hold the Power button of your Apple Wireless Keyboard. After that, turn on the Apple Wireless Keyboard again, turn on Bluetooth again on the iPad, and choose the Apple Wireless Keyboard