If you heat COCA-COLA® long enough, will it turn into a black sludgy substance ?

Yes. COCA-COLA® slowly thickens when boiled as a result of the water in the drink evaporating.  Once most of the water is gone, the sugar begins to burn. You’ll get a similar effect if you boil orange juice or any sugary liquid for long enough.