I take it the new filter takes different media than the old one? If not, just swap media and call it good.
Otherwise, the bacteria start growing in the new media immediately--it just takes time for them to grow. Your best bet is to slowly remove the media from the old filter, encouraging the bacteria to grow in the new media (for example, if you have sponges, pull out one, wait a week, pull out the next...)
HTH