Ok, I see the issue now - it's a small error on my part in the initial
input I gave you. By default, when you enter an Action in cpptraj it
goes into the Action list (or Action queue). Actions in the Action
list operate on frames from input trajectories. Coordinates data sets
are separate from this, which is why the 'crdaction' command exists.
These concepts are explained a bit more in the Amber 15 manual
sections 29.1.3/29.1.4 and 29.4.

If you want to strip a coordinates dataset you would use crdaction
with strip, e.g.

loadcrd test.nc 1 10 ClosestA
crdaction ClosestA strip :B

will strip residues matching ':B' from the ClosestA coordinates set.
Does that make more sense now? Let me know if you have more questions.