The construction business is having trouble attracting young job seekers.

The share of workers in the sector who are 24 years old or younger has declined in 48 states since the last housing boom in 2005, according to an analysis of U.S. Census data by Issi Romem, chief economist at construction data firm BuildZoom. Nationally, the share of young construction workers declined nearly 30% from 2005 through 2016, according to Mr. Romem.

While...