Hi @patrickwachira
Run the below command w/o plugins updates it will work for you:
$ composer update --no-plugins --no-dev "magento-hackathon/magento-composer-installer"
OR
It can be an issue of PHP versions. I will recommend you to check your HTTP requests and Commande line PHP version.
You need to use same PHP version for both.
OR
Clear composer cache and the update composer.
composer clearcache
composer update
OR
Remove the vendor directory and the composer.lock and do a fresh install.
Thanks
--
If my answer is useful, please Accept as Solution & give Kudos