I find myself in an elevator, unable to determine if I'm in a uniform gravitational field or accelerating,
This part is exceptionally important here. It means that the measurements are all done from the perspective of the person on the elevator. Thus the acceleration in question is the proper acceleration of the elevator passenger and the time in question is the proper time of the passenger.
calculating the acceleration, a
The passenger’s proper acceleration can be directly measured with an onboard accelerometer. Similarly the passenger’s proper time can be directly measured with an onboard clock.
solve the equation for t, the amount of time it takes for my mass to reach c accelerating at a.
If the acceleration stops before t, I was accelerating through empty space
If the acceleration continues beyond t, I must be in a uniform gravitational field
Why won't this work?
You can do it, but the t is infinite. The passenger can go for an infinite amount of proper time at a constant proper acceleration without exceeding c. From the perspective of an external inertial observer the coordinate acceleration will decrease and time dilation will increase as the elevator asymptotically approaches c but never exceeds it.