It is not for a prophet to have captives until he has thoroughly subdued the enemy in the land. You desire the passing gains of this world, while God desires the Hereafter. God is Almighty, All-Wise.
مَا كَانَ لِنَبِيٍّ أَن يَكُونَ لَهُ أَسْرَىٰ حَتَّىٰ يُثْخِنَ فِي الْأَرْضِ ۚ تُرِيدُونَ عَرَضَ الدُّنْيَا وَاللَّهُ يُرِيدُ الْآخِرَةَ ۗ وَاللَّهُ عَزِيزٌ حَكِيمٌ
Ma kana linabiyyin an yakoona lahu asra hatta yuthkhina fee alardi tureedoona AAarada alddunya waAllahu yureedu alakhirata waAllahu AAazeezun hakeemun