No, that was correct to do. Filer media from an already established tank will help also.
You need to check your ammonia and nitrite levels and when they both drop to 0ppm your tank is cycled. There's no set time. It can take between 7 days and 2 months depending on how you do it.
You need to have a source of ammonia in there tho to keep the bacteria alive while it's cycling. Using pure ammonia (if you shake the bottle and it foams, don't use it.)or dropping food in will do this for you. First the ammonia will spike to aboput 5ppm then start to drop and then you want to add only half ,and sometimes less than half, of the amount of ammonia you were previously using. You will start to see a nitrite spike now. When this drops to 0ppm your tank is cycled.
When you have 0ppm ammonia, you still need to add more but be very careful doing this. You don't want to add too much and you shouldn't see any ammonia reading. Adding too much will only cause the cycle to take longer.