<?php

$bootstrap = realpath(__DIR__) . './app/bootstrap.php';
if (is_file($bootstrap )) {
    include $bootstrap 
}
​
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
​
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('adminhtml');
$productCollectionFactory = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
​
$collection = $productCollectionFactory->create()
->addAttributeToSelect('*')
->addAttributeToFilter('type_id', "[your type ]" );
foreach($collection  as $product){
    $product->setTypeId('simple')->save(); [changed type]
   echo "sku-> ". $product->getSku() ."\n";
}