This question has been answered by multiple community members. See the first response.
<?php
//[[!joinUsersToGroup? &group=`yourNewGroup`]]
if ($collection = $modx->getCollection('modUser')){
foreach ($collection as $user){
$user->joingroup($group,'Member');
}
}[[!joinUsersToGroup? &group=`yourNewGroup`]]
<?php
if ($collection = $modx->getCollection('modUser',$newGroup)){
foreach ($collection as $user){
$user->joingroup($oldGroup,'Member');
}
}