Realistically the AC130 has zero A2A capability. It can only deploy it's weapons in a small cone shape area leaving roughly a 80% blind side.
I agree though that once it has you locked up and you do not get out of that firing zone you prob will be toast.
but
Talking under correction, it does not have radar, possibly only RWR and it's a huge target that can be seen much farther away than 15nm for sure, making it easy to track without radar.
So for a small fighter attacking it it will only know about you if you use your radar (which would be stupid) or they see you (small fighter, highly unlikely) or AWACS tells them in which case you will have to deal with a CAP yourself in anycase.
The chances of one operating where there is a hostile A2A threat is certainly zero me thinks anyway! It's too much of an asset with too many lifes to risk like that.