The easiest way to deal with situations like this is usually to not kill the creeper at all. Just despawn it.
From that wiki link:
- A mob will immediately despawn if ever there is no player within 128 blocks of it. Note that this appears to be a sphere, not a cylinder
from map top to bottom.
- A mob that has had no player within 32 blocks of it for more than 30 seconds has a 1 in 800 chance of despawning on each game tick (1/20th
of a second). Therefore, the half-life of monsters not within 32
blocks of a player is 27.73 seconds, after the initial 30 seconds have
So, either wander a short distance away and wait, or wander a longer distance away, and the creeper will simply cease to exist, making the area safe again, at least until something else spawns in.