Hi Richie
The word "it" is wrong because the word "it" should refer back to something specific. In your sentence, "a ghost" does not refer to a specific ghost, but rather to ghosts in general (i.e. any ghost).
- Have you ever seen a ghost?
No, I have never seen one.
- Have you ever seen the ghost that lives in our attic?
No, I have never seen it.