It is beyond the dignity of a Prophet that he may hold any captives, except temporarily, during warfare. They must be freed at the conclusion of hostilities by way of kindness, for ransom, or by exchange of prisoners of war, and there is no other option to keep them (47:4). You may desire the fleeting gains of this world, but Allah desires for you the good of Eternal Achievement, the life to come. Allah is Mighty, Wise.