The world of food allergy/intolerance is a very confusing place and not all doctors take it seriously or even know what to do even if they do think it's an issue. It's possible that this foster parent is trying but just can't get good answers.
Your niece could have an allergy, intolerance or reflux. It's hard to know what one means by 'does very bad' on formula. Does she spit up a lot? Vomit profusely? Get rashes? Cry nonstop?
I definitely wouldn't consider juice to be a good option for regular replacement of milk (my littlest is 20 months and still doesn't get juice), unless maybe she's making green smoothies and loading the girl up with veggies in there, too. (Homemade, mind you... not V8 Fusion.)
Calcium & the other nutrients can be gotten elsewhere...depends on what solids she's eating. But there is likely a formula that would work for her, too. They just might be craaaazy expensive. Nutramigen and Alimentum (hydrolized formulas) would probably be the first ones to try (I'm not an expert or anything...just going by what the suggested options were when I thought I might not be able to continue breastfeeding my dairy--among other things--intolerant son). If those don't work she might need an amino-acid based elemental formula like Neocate.
You might also talk to a nutritionist or dietician to see where else your niece can get some of the nutrients. Like maybe fish oil added to baby food for brain development... that kind of thing.
Your niece is lucky that you've got her back. Best of luck on getting custody!