If your Apple Pencil sat around unused and not kept charged up for more than a few weeks, or so, OR LONGER, then the battery in your Apple Pencil may have failed and is dead and you will have to replace ( under warranty ) or purchase another brand new Apple Pencil.
Sorry.
And it looks like some things about the Apple Pencil have not changed in the new version 2 model, either.
FYI and something Apple never divulges to it potential iPad Pro/Apple Pencil customers/users unless the potential customer/user is smart enough to ask about.
Due to the “always on and active/standby” nature of the Apple Pencil and, also, due to its very tiny rechargeable Li-ion battery ( smaller than the eraser head on a REAL wooden pencil ), the Apple Pencil needs to be constantly charged up to some significant charge level ALL THE TIME, even when not using the Pencil for prolonged periods of time!
The Apple Pencil needs to be kept charged to a minimum of 5-10% ALL THE TIME!
If the Apple Pencil battery is allowed to drain down to 0% and allowed to stay in that flat condition for more than a few
weeks, or so, OR EVEN LONGER, that very teenh, tiny little Li-ion battery is too small to keep at a 0% state for a long period
of time and it will fail and the Apple Pencil will be dead and you may have to “pop” for another $99/$129 U.S.D. Apple Pencil, once again!
You need to keep your Apple Pencil CHARGED ALL THE TIME, even if it is only to 10%-15% charge.
It must keep some charge level in that tiny Lithium-ion battery at all times!
Best of Luck to You!