Ensure that your second generation Apple Pencil is properly positioned centrally on the iPd’s magnetic/inductive charging dock. Ensure that the Pencil is in physical contact with the iPad; most iPad cases are too thick to trigger the charging process.
If the Pencil is properly positioned and in physical contact with the iPad, perform a forced-restart - as this will often clear an isolated software issue:
Force restart iPad (models with Face ID or with Touch ID in the top button)
If your iPad doesn’t have the Home button, do the following:
- Press and quickly release the volume button nearest to the top button.
- Press and quickly release the volume button farthest from the top button.
- Press and hold the top button.
- When the Apple logo appears, release the top button.

If the problem persists, you would be best advised to visit the Genius Bar at your local Apple Store or Apple Authorised Service Provider (AASP) - where the technicians will be able to test and assess your iPad and Pencil:
Genius Bar Reservation and Apple Support Options - Apple