While "captivity" refers to the state of being held prisoner or confined, "captivation" refers to the state of being completely fascinated or enthralled.
However, it's important to note that "captivation" doesn't directly relate to the confinement aspect of "captivity." If you're looking for a word that specifically refers to the state of being imprisoned, there isn't a perfect abstract noun. You could use phrases like "the condition of imprisonment" or "the state of being confined" to convey that concept.