It's 24km to walk from the Ibis Styles in the centre of Naples to Pompeii ruins.
What is the max distance for you to walk to Pompeii?
There is a a train service that was very cheap when I stayed near San Agnello di Sorrento. It circumnavigates Vesuvius and stops at Pompeii. I used my hire car to get to Pompeii and the train to get to Naples museum that has many of the Pompeii artefacts. The really nice B&B does not seem to be in business now.
As for hotels, when are you going? I have trips in May & Sept/Oct next year and I have noticed many hotels are not showing availability. Not unusual. Many places are in their rest period before the winter season over the school holidays. Many will not set their post Easter 2026 rates, let alone release rooms to the booking sites, until this season ends and they review their margins.