I would like what would be the range of costs for building a space capsule , ranging from the Apollo times to the new Boeing Starliner.
This is a very hard question to answer, I'll start with that.
First, you need to determine if you're talking about the cost of development as well as the cost of each capsule. If we count the development cost then it's pretty easy to do this calculation for the Apollo spacecraft:
The total cost of the CSM for development and the units produced was $36.9B in 2016 dollars from wiki.
Since there were 19 CSMs that launched into space, the figure per csm is $2B each in 2016 dollars. The CSM was not meant to be a commercial spacecraft, so this figure is probably about as accurate as we're going to get, although I'm interested in the post-development costs if anyone has them.
This is practically impossible to answer for the starliner and crew dragon, since they have not yet flown and we only know what NASA paid for their development - \$4.8B and $3.1B, respectively source here. However, the cost per launch is unlikely to be anywhere near this:
At a NASA news conference on May 18, 2012, SpaceX confirmed their target launch price for crewed Dragon flights of $160 million source
So we might say that the Crew Dragon costs \$160M per launch. Since a Falcon 9 launch costs around \$60M, and we have to factor in recovery and operations, we might peg the cost for the spacecraft itself at around $50-80M. Again that doesn't really answer the direct question that is asked, and is an estimate. Unfortunately, I don't think we'll be able to find much more information than cost per launch.
For Soyuz, there are rumor articles around that talk about prices for the spacecraft itself being around $14M, not including launcher:
That is the Soyuz launch vehicle and the Soyuz and or Progress spacecraft each cost $14,316,392.27 dollars at today’s rate source