Hi, in order to convert data from 1 format to another format, you need to understand how data is saved in the database. Here is the documentation for this. For group, data is saved as an array, each element of which is the value of sub-fields.
In this case, if you are using simple text
field, your data is just multi rows in the database, so getting values will not be a big problem. But I'm not clear how you want to put them in a group? Will the text field is a sub-field of the new group? If so, you can use the following code:
<?php
$text_id = 'TEXT_FIELD_ID';
$group_id = 'GROUP_FIELD_ID';
$posts = get_posts( array(
'posts_per_page' => -1,
) );
foreach ( $posts as $post )
{
$text = rwmb_meta( $text_id, 'type=text', $post->ID );
$meta_key = "{$group_id}[{$text_id}]";
update_post_meta( $post->ID, $meta_key, $text );
// delete_post_meta( $post->ID, $text_id ); // Remove old data, use with care
}