Been there done that, easy fix. Clamp a Vise-Grip pliers on the pipe as tight as you can. If you have an impact wrench give it a couple of quick shots, should come loose. No impact, breaker bar with a socket and steady pressure normally will do the job. When I reinstall the cap, I always use a bit of thread tape, which makes it very easy the next time.