As described, you may indeed have a faulty Apple Pencil.
Whilst connected to your iPad, verify the Pencil charging status from the Battery Widget - this being accessed from your first Home Screen. Your Pencil should show that it is charging - with an increasing battery charge percentage. If not, then perhaps you have a bad Pencil.
The tiny internal Li-ion battery is susceptible to permanent/irreversible damage through being left discharged for long periods. Even some “new” pencils can exhibit signs of failure out-of-the-box if they are “old stock”.
It is essential that if you have an Apple Pencil that you charge it regularly - whether used or not - so as to protect the battery from deep-discharge. Do not allow a pencil to remain in low-charge state for any period of time - as the internal battery will fail, rendering the Pencil useless.
If the Pencil Battery has failed, the only remedy is to replace the Pencil. Being new you should look to having it replaced. If the Pencil is within its one year warranty, if otherwise undamaged, Apple will usually replace the Pencil without quibble. If the Pencil is brand new, your retailer should replace it anyway.
I hope this information proves to be helpful to you.