Since you never agreed to be a live-in, then you have every right to decline that offer.
Because being a live-in Nanny is just not for everyone.
Just tell both the family as well as the agency that you could not find a suitable apartment nearby for the amount of rent that you are able to afford so that unfortunately you will be unable to stay w/this position.
Also, since you are on a trial period you can also just tell the agency it wasn’t a good match.
Wishing you all the best OP!