There are two aspects to the questions:
On the one hand, there are more than enough humans fearing fire and any intelligent creature in the wild is likely to be wary around fire because of its destructive capability. Any wild animal in regions where fire can occur naturally as bush fires etc. would be extremely unintelligent not to fear it.
On the other hand, pets like cats, dogs, horses or live stock animals can be trained to be around fire without showing any signs of fear. Because they are socialised to not fear fire, they do not fear it. In the same way, wild animals which are domesticated, like wild sheep, goats or mustang horses etc. have been trained to 'live with human fire'.
Examples where wild animals have learned to not fear fire are grizzly bears who learned that humans provide a vast source of food. The ones which realised that the fires around human campers are typically well-controlled, stopped fearing them. Therefore, it is a matter of learning the 'gains' of fire which out of human control is typically extremely dangerous to wild animals as it may destroy their whole living environment.
The aspect of not fearing fire, because you can reason its origin or create it on your own, requires an extremely high level of awareness and intelligence. You can read up that chimpanzees are capable of the first steps in this direction.