There's something in there jamming it.
It should unscrew 2 or 3 turns, then pull out.
If you've emptied the water (should be a draining tube beside the cap) then rapidly tighten and slacken the cap to get it to unscrew fully.
(It's a bit of work but it normally gets it to unscrew and saves dismantling the machine).
If you use pliers to tighten and slacken the cap, take care not to force it and break it.
If it still won't come out, let me know and I'll advise further.
Let me know how it goes