Depends on the rifle. If yours has a drum and nipple arrangement, it is simply a matter of unsrewing the drum and replacing it with a touchhole liner, and replacing the lock with a flinlock model. Lots of the common mass produced guns are set up so that one stock can be fitted with either a flintlock or caplock mechanism. I had a CVA Mountain Rifle that I did this with and shot flint and cap interchangeably.
If your gun has the bolster (snail) type arrangement, then conversion to flint becomes more of a problem, especially if you intend to use the same barrel. It requires re-breaching or milling and machining operations which soon becomes very expensive. If you opt to get a new flintlock barrel and lock, you will soon see that for the money you will have tied up you may as well buy a whole new gun.