It is normal for a 2 year old boy to go 2 hours and sometimes even as long as 3 hours with a dry diaper before they pee.
My 2 year old sometimes goes 2 hour and sometimes as long as 3 hours before he wets his diaper.
At 2 years old they sometimes hold the pee in for a few hours and then once they feel their bladder filling up and get the urge to pee they then let lose.
If the 2 year old boy has not peed within 6 hours then I would be concerned about dehydration.
But sometimes toddlers and 2 year olds pee different amounts during the day.
Some days my 2 year old son pees every 30 minutes and has a wet diaper ever few hours and then some days he just does not pee as often and can have a dry diaper for 2 to 3 hours.
As long as you're keeping your toddler hydrated with water, juice etc then they should be okay.
But if the 2 year old boy has no wet diapers within 6 to 8 hours then I would take them to the doctor or urgent care to be checked out.
Some 2 year olds go through 4 to 5 diapers per day while some days some 2 year olds pee less and may only go through 2 to 4 diapers per day.