A lot of the time after I masturbate I will have a dull ache in my testicles for 2-4 hours. I don't have any other pain besides that and the pain doesn't happen when I have wet dreams. Should I be concerned?
There can be several possibilities. The most likely one is that you are holding your erection longer when you masturbate. This can create a dull ache in the scrotum because the blood is getting oxygen starved. Another reason is when you are aroused, the cords holding the testicles pull up. After a while the muscles get tired of pulling and they especially ache once they are relaxed again.
If you are getting involved in pornography, which is a sin (I Thessalonians 4:3-5), it can cause you to remain erect for several hours, which will result in aches when you are done.
When you have a wet dream, you don't stay erect as long, so you don't have any aches.
It is possible that when you are masturbating, you are hitting your testicles without being aware of it. Testicles don't like to be hit and so you would have some discomfort when you are done.
Another possibility is that you are masturbating too often, though I would expect that you would not have wet dreams if this were true. The ache would come from over using the muscles of the reproductive system and keeping the seminal vesicles too empty.