There are many tasks that are still impossible with the current knowledge and understanding, but making a closed human-sustaining environment and going to Mars are not among those.
These 2 tasks can be solved with only the current knowledge, but they depend on the solution of many technological problems that require only a lot of money and of work.
Only a fraction of the huge amounts of money that have been invested now in AI would suffice to solve these problems, if a serious effort would be done towards such goals.
Whether it is useful to spend so many resources on such goals is a different question, but developing the technologies for an almost-closed self-sustaining environment is something that certainly would also generate by-products that would be useful on Earth, not only in interplanetary expeditions.