The only way I've managed to force a religion to be founded in a specific city is to avoid spreading any religions to it beforehand. Since some religions spread on their own, this is not 100% reliable, unless the city is not attached to any trade routes (has no roads connecting to it, it's not on a tile next to a river, it's not coastal or you don't have Sailing yet). If you have a religion in every city but that one, it will become the holy city.