What is consciousness?
There isn't a commonly accepted definition of consciousness (that I'm aware of).
This lack of a precise definition presents the first and biggest problem in providing a concrete answer to "can artificial intelligence be conscious".
The Wikipedia page on animal consciousness goes into a bit of detail about this. It lists one example in 2004 where eight neuroscientists said the following in "Human Brain Function":
... we do not know whether consciousness can emerge from non-biological systems, such as computers... At this point the reader will expect to find a careful and precise definition of consciousness. You will be disappointed. Consciousness has not yet become a scientific term that can be defined in this way. ...
How can you say something is or is not conscious if you don't know what exactly consciousness is?
How do we measure consciousness?
So we don't have a definition, but let's consider how it might be measured.
Both of the below present some problems, but I don't think there are other ways to go about measuring consciousness (they cover a fairly broad range of possible ways to measure it).
So we may never be 100% sure something is conscious, even with a formal definition and a way to measure it.
But let's see what these ways of measuring might say about artificial intelligence.
Physical internal analysis
One way to measure it would be to look at the inner workings of an entity (e.g. a brain scan or map or looking at the architecture or flow of a computer or computer program).
Measuring it in this way would give the most conclusive answer, but it's also really, really hard. What if you can't see these inner workings in enough detail? What if you can't fully understand it? How would you even translate what you're seeing into an answer to "is this thing conscious"? If you can't fully understand it, would you be able to compare it with an entity that works fundamentally differently? There is still a ton we don't understand about what's going on in the human mind, so we're not really at a point where we can use that to tell whether something completely different is conscious.
Although one could actually make a fairly strong case here that some artificial intelligence can be conscious (in theory). Assume "souls" (as in non-natural parts of our minds) don't exist or aren't required for consciousness (this argument wouldn't work too well without this assumption). So brains are just biological systems that are often created in nature during reproduction. There doesn't seem to be any good reason to believe it's fundamentally impossible to artificially create something that can be naturally created, or to create something that functions exactly the same. In fact, artificial neural networks are, as the name suggests, created to be structurally similar to how brains works (but of course built from code instead of biology). Although they are much, much simpler, since there isn't enough computing power in the world to come close to what a human brain does (this seems to be more of a practical challenge than a theoretical problem).
The other way to measure consciousness would be through observation, e.g. looking at how it behaves in response to stimuli.
We can compare this to the closely related topic of self-awareness. This is generally measured exclusively through observation. One common way to measure this it by putting entity in front of a mirror and seeing whether it recognises itself. You could also potentially ask it questions (if able) to see if its responses demonstrates self-awareness.
This has what I'd call "the simulation problem". If I am conscious, and something acts exactly like I would, is that thing also conscious? Since we're only measuring consciousness through observation, the only possible answer we can give here is "yes".
Now artificial intelligence might still be a long way off from what humans are capable of, but they have made quite a lot of progress towards what humans are capable of in many complex areas (such as natural language processing and computer vision). Of course there is still a long way to go, but I don't see a reason to believe that a computer or other artificial device is fundamentally incapable of simulating the behaviour of a human. For reference, I am a computer scientist working with artificial intelligence.
So, with this type of analysis, we would conclude some future artificial intelligence can be conscious (in theory).