How can I get my 3 year old to sleep in their own room?

How do I get my three-year-old to sleep in a room alone?? Her sister, who just turned one when she turned 3, was having some health issues and was in the hospital quite a bit as an infant, and my brother n his wife apparently were helping my parents watch her while I was gone with my youngest… anyway they knew not to put her in her bedroom with the door closed and the light off Bc she was still getting used to being in there. Well, they did, and she ended up waking up and, from what I heard, screamed bloody murder for 10 minutes till my dad heard her and came in and got her. Now she refuses to sleep anywhere, but in a room with men is really getting hard Bc my one-year-old has set her own schedule where she gets tired about 7 pm, and my older, it honestly just depends on what her day has been like. So any advice helps!!