It will be much cheaper to use an inside model and put it where the current tank is located. But even in this case you might need to install a new and larger gas line to feed the tankless heater. The burner on a 50-gal tank pulls about 50 kBTU/h of gas, but the burner of a tankless heater that most people would think is adequate for a 3 or 4 bedroom house with say 2 full baths will pull 200 kBTU/h. You would probably have to run a new line to a capped off T in the attic to get that much supply. Also you will need a new flue (may be able to use the route of the old one), and will almost certainly need a 120-V receptacle since most new tankless require it for controls.
If I were building a new house, I would use a tankless and put it on an outside wall. If I lived in an exremely cold climate, I would wonder if an outside tankless heater could be prevented from freezing, and would inquire about this.
Twelve years ago I was considering "at some point" on replacing natural gas fired 40-gal tanks in two 1970s 2000 sq ft tract houses. (One our residence and one a rental property.) In each house the tank was centrally located in the house giving short plumbing runs to points of use. On an impulse I bought on sale two identical bottom of the line Bosch tankless water heaters (117 kBTU/h) intending to install them myself in the exact location as the tanks.
Once I had the heaters on hand I began to consider installing the one in my house in the garage, but I ultimately rejected this because it would lengthen the hot water lines and I would have to put water pipes in the attic. I even just used the existing gas supply lines. I suspect that in the winter I am not getting the full 117 kBTU/h output from the water heater when the natural gas furnace comes on (they share a 3/4" gas line), but it works well enough for us. Almost certainly if a 200 kBTU/h heater was installed the gas line would have to be upgraded.
Another possibility is that putting a tankless heater on a shared gas line with the NG fired furnace could make the furnace malfunction. The operation of our furnace was (apparently) not affected (i.e., not starved of gas when the water heater was operating), but our furnace is now 26 years old and due for replacement. When the new one is installed I will have to insure it is unaffected by the water heater. If it is, I will have to install a new separate gas line to the water heater from a capped T in the attic. I think the capped T in the attic was placed there by the builder to give an option to more easily install a gas kitchen range, but we have just stayed with an electric kitchen range.
Also note that the best installation of a tankless water heater requires special cut-off valves designed for a tankless water heater in both the incoming cold supply and outgoing hot water lines. Each of these is a double valve which allows disconnecting the water heater from the house plumbing and opening the water heater to the outside for flushing of the tankless heater to descale it.
I intended to install these heaters myself but thought better about it and hired a plumber to do both installations. I used a different plumber for each job because I was not satisfied with the job on the first one--costly and quality not what I expected for the price.