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 212,354 nationwide F-150 listings starting at $1,000.
Search Ford F-150 Questions
Ford F-150 Experts