if the node names match except for the suffix, you do not need to make 2 separate lists. You can just build a list of joints, and build the control names in a for loop.
//untested...
string $joints[]; //empty array to hold all joints
string $joint_name; //empty variable to hold current joint
string $prefix; //empty variable to hold current joint prefix (without "_jnt")
string $control_name; //empty variable to hold current group
$joints =`ls "*_jnt"`; //populate the list of all joints
// now loop through the list of joints
for ($joint_name in $joints) {
$prefix = `substitute "_jnt" $joint_name ""`; //strip "_jnt" from joint name
$control_name = $prefix+"_grp"; // add the control suffix
parentConstraint $control_name $joint_name;
}
That said, almost nobody does such things in MEL these days.
Python & pymel is almost always a simpler choice.
# also untested...
import pymel.core as pm
for joint in pm.ls("*_jnt"):
ctrl_name=joint.name().replace("_jnt","_grp")
ctrl=pm.PyNode(ctrl_name)
pm.parentConstraint(ctrl,joint)