There are three separate issues here:
3-wire vs. 4-wire
In the old days, ranges (and clothes dryers) were connected with three wires: hot, hot, neutral. Then ground wires came along and things were, in general, switched to four wires: hot, hot, neutral, ground.
There is a long history behind it, but eventually (1996 is a key date) 3-wire connections were banned, but technically old 3-wire connections are still allowed as long as nothing else is changed. What should happen is that as people replace there ranges (and clothes dryers) they should upgrade from 3-wire to 4-wire. But it rarely happens, because the appliances don't come with a cord attached and the dealers can just as easily attach a 3-wire cord/plug as a 4-wire cord/plug. So 27 years later, they're still selling 3-wire cords/plugs.
In some older houses it truly is hard to add that "missing" ground wire. But you have that wire, as should anyone with a house from 1996 or newer (and a lot of older ones as well). So that really answers that - 4 wire. Which means replacing the receptacle (not a big deal). But wait, there's more...
30A vs. 40A vs. 50A
30A uses one type of receptacle (10-30 for the old 3-wire, 14-30 for the new 4-wire). 40A and 50A use a different type of receptacle (10-50 vs. 14-50).
But in addition to the breaker and receptacle matching, the breaker and the wires need to match. The minimum size for 30A is 10 AWG, so it is a pretty safe bet you have at least 10 AWG wires. But the minimum size for 40A is 8 AWG. You can use 8 AWG on a 30A circuit, but you can't use 10 AWG on a 40A circuit.
So you need to figure out what size your wires are. There are a number of different possibilities for your existing 40A breaker, including:
- 10 AWG wire, 30A range - not suitable for your new 40A range
- 10 AWG wire, 40A range - not suitable for your new 40A range and wasn't suitable for your old one either!
- 8 AWG wire, 30A range - replace the receptacle with a 14-50 and get a matching 4-wire cord/plug. Your old range had a larger breaker than it should have, but not a big deal.
- 8 AWG wire, 40A range - replace the receptacle with a 14-50 and get a matching 4-wire cord/plug. Your old range had the wrong cord/plug/receptacle, which could have caused problems, but you'll be fine with the new range.
So the first step is to determine what size wire you have. If it is 8 AWG then replace the receptacle, etc. and you're all set. If it is 10 AWG then you need to replace the wires, which could be anything from a small task yo a huge ordeal.
Hardwired vs plug/receptacle
I generally recommend hardwired connections for ovens/ranges. Most can be installed hardwired on plug/receptacle. The wire size/breaker/etc. issues are identical, but with hardwired connections there is simply no receptacle in the middle of it all.
The instructions for your range included hardwired connection as well as cord/plug connections. They call it "conduit", but it doesn't matter whether you have conduit in your house or not, as you will in any case just use a short flexible conduit from the existing receptacle box (but without a receptacle - i.e., add a cover with a place to connect the conduit) to the range.