can you replace a 2006 3 valve 5.4, with a 2 valve 5.4
Not without a lot of retrofitting.
Maybe but you won't pass smog check and I doubt the computer is compatible with the older engine.
You'll probably have pcm ecm issues, plug the smog test situation.
Looking for a Used F-150 in your area?
CarGurus has 208,275 nationwide F-150 listings starting at $1,200.
Search Ford F-150 Questions
Are you a UK consumer? CarGurus now has a discussion forum in the UK.
Ford F-150 Experts