Wren to the Rescue

Wren to the Rescue by Sherwood Smith even suggests the archetype in its title (as rescue of a friend or family member is one of the few primary goals a Girl Underground can have).

Wren is an orphan who finds out that her best friend at the orphanage is actually a princess, hiding there for fear of a wrathful enemy of her kingdom. When the friend’s parents decide to bring her back, Wren goes along, but the princess is quickly kidnapped, and Wren is suddenly thrust into the adventure she always dreamed about. With help from a magician’s apprentice and a young prince, Wren journeys to the fortress of the enemy king to rescue her friend. She must avoid the fierce creatures that the evil king sends to kill them. And when she is magically transformed, she must bravely continue on in a new form. In the end, she manages to single-handedly rescue both her friend and her imprisoned companions. However, noticeably missing is any confrontation with her adversary – she slips away from him rather than defeating him directly.

This is only one of several Wren books, but I don’t know yet if the others also fit the story.