Whether you consider coke and charcoal to be the same thing depends on the use and your tolerance for impurities
If your criterion for things being the same is that they are mostly made of the same element (say, perhaps, >95%) then coke and charcoal are the same.
But they clearly have different properties and are used for different things.
Both are mostly carbon. But the impurities differ. As do the physical forms. And it might not even be correct to classify either into a single category. Different coals give different cokes. Some are purer and denser than others and may be preferred for a particular task. Anthracite coal usually gives coke that works well in steel production. There are a variety of sources and methods for producing charcoal. Some are fine as a fuel for barbecues, some are used in chemistry. Careful production techniques are needed to make activated charcoal which is useful as an absorbing agent in chemistry or as a substrate for some catalysts.
Some differences depend on the impurities, others on the physical form (activated carbon is a fairly pure charcoal with a very high active surface area, for example).
At a crude chemical level (when you are not worried about the use) they are both "the same". But if you have a particular application in mind, not only are coke and charcoal different but both cover a wide variety of different substances.