Add a group to an existing group

ents = Sketchup.active_model.active_entities
found = ents.grep(Sketchup::Group).find {|g| g.name == "MyGroup" }
if found
  clone = found.entities.add_instance(selectedGroup.definition,some_transform)
  clone.material= selectedGroup.material
  # If selectedGroup has attribute dictionaries you'll need
  # to iterate them and copy them to the new clone group.
  clone.name= selectedGroup.name
  # Lastly, erase the source group:
  selectedGroup.erase!
end

Since I do not know anything about your groups, I have no idea how you wish to position the clone within the target group. You will need to produce some_transform to position the clone.

See: Geom::Transformation


FYI: [How to] Post correctly formatted and colorized code on the forum?