You no need to create the same file path in app/code folder. Your way will not work.
Please find the file below folder structure:
\vendor\magento\module-grouped-product\Model\Product\Type\Grouped.php
You can check with change in this file.
Also I would suggest you to override this code with creating a custom module.
It's delayed massage. You have created a wrong directory structure.
File code changes are correct but directory structure is wrong
Update code line no. 347
if ($isStrictProcessMode && !$subProduct->getQty() && $subProduct->isSalable()) {
You can update the file code changes on vendor/magento/module_groupedproduct/Model/Product/Type/Grouped.php file for now later update with the creating custom module.