What is returned from both the << Get Column Names, and << Get Column Group are JMP lists. You can roughly think of them as Arrays of values. Please review the Scripting Guides section on using lists.
Below is a modification of your code, that will check for the comparison between 2 lists, for column names found common in both lists and then removing them from the Key List, list. Please note, that the Contains function requires literal strings for it to function, so that is why the <<get column names has the "string" option added to it, and that the Contains() function has the search element from the Keys List, converted to a character string before the search across the Column Names list.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
column list = dt << Get Column Names( Continuous, string );
key list = dt << Get Column Group( "Processes" );
Show( "complete list", key list );
For( i = N Items( key list ), i >= 1, i--,
If( Contains( column list, Char( key list[i] ) ),
key list = Remove( key list, i, 1 )
)
);
Show( "final list", key list );
In my example, the Keys List ends up not having any values, since all elements in the group are numeric columns
Jim