Juliet is acting immature in this quote because she is acting very hastily. She is basically saying that if Romeo is married, she will never marry. She loves Romeo, even though she has never seen him. She does not even know his name! Her statement is also an acknowledgement of her youth and foreshadowing of her early death.
Juliet also shows coyness and immaturity in how she approaches asking Nurse for Romeo’s name. She asks about several other boys first, like a young girl at a dance (which is exactly what she is).
Come hither, Nurse. What is yon gentleman?
The son and heir of old Tiberio.
What's he that now is going out of door?
Marry, that, I think, be young Petruchio.(140) (Act 1, Scene 5, p. 34)
In the end, Juliet does learn that Romeo is a Montague but this does not bother her much. The speed with which she agrees to marry him is a definite sign of youthful exuberance and immaturity. Of course, her statement is also somewhat prophetic—because she does die young.
This line from Romeo and Juliet reminds one of modern-day female teenagers, especially as depicted in some motion pictures. Juliet seems the pubescent teenage girl, who, in her hysteria over young, attractive males, screams, jumps, and speaks in hyperbole such as "If he doesn't look this way, I'll just die!" or "If he doesn't call me, I don't know what I'll do." Ironically, while this hyperbole contains the impetuous words of a young woman, Juliet's words become soberly and sadly true.
Juliet's reaction in this passage is quite the contrary to her polite and somewhat disinterested response to her mother's earlier urging to "read o'er the volume of young Paris' face,/and find delight writ there" (1.3). Juliet replies that she will dutifully look at Paris if that is what her mother wants. Now, instead, Juliet is struck with Cupid's arrow and is extremely excitable as the physical appearance of Romeo has greatly stirred her emotions and, obviously, her libido. This sudden emotional change from her dispassionate reaction to the mention of Paris foreshadows the trope of "violent delights" mentioned in Friar Laurence's soliloquy in Act II and hers and Romeo's violent love that drives them to passionate and deadly acts throughout the play.