うちに vs 間に — both mean "while", what's the actual difference

studying うちに and my textbook keeps comparing it to 間に (from earlier grammar) like they're basically twins. From what I can tell うちに is about doing something WHILE a certain state/condition still holds, kind of implying it's going to end or change soon — like 若いうちに (while you're still young, before that changes). does 間に carry that same "before it changes" nuance, or is it more neutral/just marking a time frame without implying anything will end?
Post
沐學 Mizuru