Age could well be the issue, though you don't have to take that personally. You're 40, he's 25. A 15 year age difference is 37% of your age; it's 60% of his, which makes it in some ways similar to you dating a 64-year-old man. Or, to the more extreme version, considering that people rarely date much before age 15 or so, it's 150% of his time since 15, while it's only 60% of yours -- which means that it would in that sense be equivalent to you dating a 77-78-year-old.
Does it still feel like age is just a number?
For some people, yes, actual ages are irrelevant. And that's great for them. But there are legitimate reasons why age means more to some people. Maybe he wants to have kids when he's 35, and sees that you'd be 50 then. Maybe he wants to freedom to pack up and move to a new city, and sees that you've put down roots. Maybe he sees that you're active and in shape now, but thinks that in 10 years the difference between you will be more significant. Maybe he's not interested in having to deal with people assuming he's dating a sugar daddy, even if that's not what you'd be.
Then again, it could be about things other than age entirely. I've got gay friends who are perfectly nice people who I'm simply not attracted to, and there are a few role reversed situations (dammit). Just because the age difference is the glaringly obvious possibility doesn't mean that it's actually the cause, particularly if you've never had a discussion about it.
Normally, I'm an advocate of just telling someone how you feel, but it seems in this case that a) he's pretty unambiguous in not being interested and b) you're concerned that if you are rejected you could lose your work out partner. So, in this case, I'd say stop dropping the hints and just treat him as the workout partner. You may find you're happy with that, and if he expresses interest later, all the better. Or you may find that you're not happy with just the workout partner, and decide that you'd rather risk losing that than possibly miss a chance at romance. Either way, your current situation doesn't sound sustainable, and choosing to view him solely as the workout partner is both reversible and in line with what you'd observed of his intentions.