Venezuela has no means of paying back in currency for the loans or the oil infrastructure China has built or promised to build already to the tune of $60B so, China structured repayment to be in barrels of oil essentially lasting forever. You'll notice DJT has stated that China can buy oil which in my opinion means China will still have access to oil on the market, but money previously provided to Venezuela is now a gift.
So, two birds with one stone; a dictator taken down and a major push for influence by Red China in this hemisphere reined in.