It sounds like you are trying to say that Jesus is God by connecting the “I am” from John 8:24 to the statement that God made to Moses “I AM that I AM” in Ex 3:14.
As always let’s start by reading the scripture in context.
Then said Jesus again unto them, I go my way, and you shall seek me, and shall die in your sins: where I go, you cannot come.
John 8:21-27
Then the Judeans (Pharisees v:13) said, Will he kill himself? because he said, Where I go, you cannot come.
And he said unto them, You are from below; I am from above: you are of this world; I am not of this world.
I said therefore unto you, that you shall die in your sins: for if you believe not that I am he, you shall die in your sins.
Then said they unto him, Who are you? And Jesus said unto them, Even the same that I said to you from the beginning.
I have many things to say and to judge of you: but He that sent me is true; and I speak to the world those things which I have heard of Him.
They understood not that he spoke to them of the Father.
First, if you look back to John 8:13 you will notice that Jesus is speaking to the Pharisees and not the people in general. So, when he says “where I go, you cannot come,” “you shall die in your sins,” “you are from below,” “you are of this world,” etc… it is the Pharisees and religious leaders to which he is speaking. To the people he said “follow me.” This is as true today as it was then.
In John 8:25 the Pharisees ask “Who are you?” in response to Jesus’ statement in the previous verse. Contextually, based on this question, John 8:24 should read “you understand not who I am” as opposed to “that I am.” Below are the verses in context:
… if you believe (understand) not who I am, you shall die in your sins.
John 8:24-25
Then said they unto him, Who are you? And Jesus said unto them, Even the same that I said to you from the beginning.
Hopefully you can see that every time Jesus says “I am” he is not claiming to be God. In fact, in these few verses, Jesus clearly shows that he is not God.
… He that sent me is true; and I speak to the world those things which I have heard of Him.
John 8:26-27
They understood not that he spoke to them of the Father.
If Jesus were God, then who sent him and whose words is he speaking?
Getting back to your question then, Jesus is not referring himself as “I AM”, or God. In context he is referring to the beginning of this discourse. So, who did Jesus say he was in the beginning of this discourse?
Then spoke Jesus again unto them, saying, I am the light of the world: he that follows me shall not walk in darkness, but shall have the light of life.
John 8:12
In summary, Jesus is saying that he is the light of the world, in that he spoke to the world those things which he heard from the Father (v:26-27). Since the Pharisees don’t see this (v:25), they walk in darkness and can’t follow him. As he said, “where I go you cannot come (v:21).”
The Pharisees could not recognize that Jesus was the light of the world, the representative of God. The religions and religious leaders today cannot recognize Jesus because they think he is God. In either case they have been blinded by the light.